diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigModal.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigModal.tsx index 8439d42f070e3..c6eec098c155c 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigModal.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigModal.tsx @@ -62,17 +62,29 @@ import { } from './utils'; import DividerConfigForm from './DividerConfigForm'; +const MODAL_MARGIN = 16; + const StyledModalWrapper = styled(StyledModal)<{ expanded: boolean }>` - min-width: 700px; - width: ${({ expanded }) => (expanded ? '100% !important' : '70%')}; + min-width: 880px; + width: ${({ expanded }) => (expanded ? '100%' : '70%')} !important; + + @media (max-width: ${880 + MODAL_MARGIN * 2}px) { + width: 100% !important; + min-width: auto; + } .ant-modal-body { padding: 0px; } + ${({ expanded }) => expanded && css` height: 100%; + + .ant-modal-body { + flex: 1 1 auto; + } .ant-modal-content { height: 100%; } @@ -94,6 +106,10 @@ export const StyledForm = styled(AntdForm)` width: 100%; `; +export const StyledExpandButtonWrapper = styled.div` + margin-left: ${({ theme }) => theme.gridUnit * 4}px; +`; + export const FILTERS_CONFIG_MODAL_TEST_ID = 'filters-config-modal'; export const getFiltersConfigModalTestId = testWithId( FILTERS_CONFIG_MODAL_TEST_ID, @@ -604,39 +620,38 @@ function FiltersConfigModal({ -
{t('Add and edit filters')}
- setSaveAlertVisible(false)} + onCancel={handleCancel} + handleSave={handleSave} + canSave={!erroredFilters.length} + saveAlertVisible={saveAlertVisible} + onConfirmCancel={handleConfirmCancel} /> + + + } - expanded={expanded} - destroyOnClose - onCancel={handleCancel} - onOk={handleSave} - centered - data-test="filter-modal" - footer={ -