You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by mi...@apache.org on 2026/04/28 12:19:10 UTC
(superset) 01/04: fix(explore): ensure unsaved-changes dialog renders above View SQL modal (#39569)
This is an automated email from the ASF dual-hosted git repository.
michael-s-molina pushed a commit to branch 6.1
in repository https://gitbox.apache.org/repos/asf/superset.git
commit 61bcf578a693cf1a331bbe8750afcdfdf6dbaad3
Author: Evan Rusackas <ev...@preset.io>
AuthorDate: Mon Apr 27 13:02:25 2026 -0400
fix(explore): ensure unsaved-changes dialog renders above View SQL modal (#39569)
Co-authored-by: yousoph <so...@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <no...@anthropic.com>
(cherry picked from commit 7c4b2b137c7edf512822f9c0c753d0e7920b7b23)
---
.../superset-ui-core/src/components/UnsavedChangesModal/index.tsx | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/superset-frontend/packages/superset-ui-core/src/components/UnsavedChangesModal/index.tsx b/superset-frontend/packages/superset-ui-core/src/components/UnsavedChangesModal/index.tsx
index cca9c7573df..bfbbfc8a17d 100644
--- a/superset-frontend/packages/superset-ui-core/src/components/UnsavedChangesModal/index.tsx
+++ b/superset-frontend/packages/superset-ui-core/src/components/UnsavedChangesModal/index.tsx
@@ -20,6 +20,10 @@ import { t } from '@apache-superset/core/translation';
import { Icons, Modal, Typography, Button } from '@superset-ui/core/components';
import type { FC, ReactElement } from 'react';
+// Ant Design's default modal zIndex is 1000. Using a higher value ensures
+// this dialog always renders above other open modals (e.g. a draggable View SQL modal).
+const UNSAVED_CHANGES_MODAL_Z_INDEX = 1100;
+
export type UnsavedChangesModalProps = {
showModal: boolean;
onHide: () => void;
@@ -27,6 +31,7 @@ export type UnsavedChangesModalProps = {
onConfirmNavigation: () => void;
title?: string;
body?: string;
+ zIndex?: number;
};
export const UnsavedChangesModal: FC<UnsavedChangesModalProps> = ({
@@ -36,6 +41,7 @@ export const UnsavedChangesModal: FC<UnsavedChangesModalProps> = ({
onConfirmNavigation,
title = 'Unsaved Changes',
body = "If you don't save, changes will be lost.",
+ zIndex = UNSAVED_CHANGES_MODAL_Z_INDEX,
}: UnsavedChangesModalProps): ReactElement => (
<Modal
centered
@@ -43,6 +49,7 @@ export const UnsavedChangesModal: FC<UnsavedChangesModalProps> = ({
onHide={onHide}
show={showModal}
width="444px"
+ zIndex={zIndex}
title={
<>
<Icons.WarningOutlined iconSize="m" style={{ marginRight: 8 }} />