fix(frontend): fix loading spinner positioning in Save modal and filters panel (#39205)

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: yousoph <sophieyou12@gmail.com>
This commit is contained in:
Maxime Beauchemin
2026-04-08 13:23:30 -07:00
committed by GitHub
parent 63cceb6a79
commit d63308ca37
2 changed files with 18 additions and 12 deletions

View File

@@ -288,8 +288,15 @@ const VerticalFilterBar: FC<VerticalBarProps> = ({
<Bar className={cx({ open: filtersOpen })} width={width}>
<Header toggleFiltersBar={toggleFiltersBar} />
{!isInitialized ? (
<div css={{ height }}>
<Loading size="s" muted />
<div
css={{
height,
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
}}
>
<Loading position="inline-centered" size="s" muted />
</div>
) : (
<div css={tabPaneStyle} onScroll={onScroll}>

19
superset-frontend/src/explore/components/SaveModal.tsx Normal file → Executable file
View File

@@ -93,11 +93,6 @@ export const StyledModal = styled(Modal)`
.ant-modal-body {
overflow: visible;
}
i {
position: absolute;
top: -${({ theme }) => theme.sizeUnit * 5.25}px;
left: ${({ theme }) => theme.sizeUnit * 26.75}px;
}
`;
class SaveModal extends Component<SaveModalProps, SaveModalState> {
@@ -172,17 +167,21 @@ class SaveModal extends Component<SaveModalProps, SaveModalState> {
this.setState({ newSliceName: event.target.value });
}
onDashboardChange = async (dashboard: {
label: string;
value: string | number;
}) => {
onDashboardChange = async (
dashboard:
| {
label: string;
value: string | number;
}
| undefined,
) => {
this.setState({
dashboard,
tabsData: [],
selectedTab: undefined,
});
if (typeof dashboard.value === 'number') {
if (dashboard && typeof dashboard.value === 'number') {
await this.loadTabs(dashboard.value);
}
};