Skip to content

Commit

Permalink
fix: do not close database modal on mask click (#28750)
Browse files Browse the repository at this point in the history
  • Loading branch information
eschutho authored and pull[bot] committed Oct 1, 2024
1 parent d6f421a commit 3a8da9f
Showing 1 changed file with 12 additions and 9 deletions.
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()}
</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

0 comments on commit 3a8da9f

Please sign in to comment.