Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: do not close database modal on mask click #28750

Merged
merged 1 commit into from
May 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 12 additions & 9 deletions superset-frontend/src/features/databases/DatabaseModal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1727,35 +1727,36 @@ const DatabaseModal: FunctionComponent<DatabaseModalProps> = ({
) {
return (
<Modal
centered
css={(theme: SupersetTheme) => [
antDModalNoPaddingStyles,
antDModalStyles(theme),
formHelperStyles(theme),
formStyles(theme),
]}
footer={renderModalFooter()}
maskClosable={false}
name="database"
onHandledPrimaryAction={onSave}
onHide={onClose}
onHandledPrimaryAction={onSave}
primaryButtonName={t('Connect')}
width="500px"
centered
show={show}
title={<h4>{t('Connect a database')}</h4>}
footer={renderModalFooter()}
width="500px"
>
<ModalHeader
isLoading={isLoading}
isEditMode={isEditMode}
useSqlAlchemyForm={useSqlAlchemyForm}
hasConnectedDb={hasConnectedDb}
db={db}
dbName={dbName}
dbModel={dbModel}
fileList={fileList}
hasConnectedDb={hasConnectedDb}
isEditMode={isEditMode}
isLoading={isLoading}
useSqlAlchemyForm={useSqlAlchemyForm}
/>
{passwordNeededField()}
{confirmOverwriteField()}
{importingErrorAlert()}
{passwordNeededField()}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just alphabetized here a bit

</Modal>
);
}
Expand Down Expand Up @@ -1783,6 +1784,7 @@ const DatabaseModal: FunctionComponent<DatabaseModalProps> = ({
<h4>{isEditMode ? t('Edit database') : t('Connect a database')}</h4>
}
footer={modalFooter}
maskClosable={false}
>
<StyledStickyHeader>
<TabHeader>
Expand Down Expand Up @@ -1942,6 +1944,7 @@ const DatabaseModal: FunctionComponent<DatabaseModalProps> = ({
show={show}
title={<h4>{t('Connect a database')}</h4>}
footer={renderModalFooter()}
maskClosable={false}
>
{!isLoading && hasConnectedDb ? (
<>
Expand Down
Loading