mirror of https://github.com/apache/superset.git
fix(dashboard): Force native filters into vertical orientation when FF off (#22265)
This commit is contained in:
parent
a642d126f8
commit
969c9634f6
|
@ -246,7 +246,10 @@ const DashboardBuilder: FC<DashboardBuilderProps> = () => {
|
||||||
state => state.dashboardState.fullSizeChartId,
|
state => state.dashboardState.fullSizeChartId,
|
||||||
);
|
);
|
||||||
const filterBarOrientation = useSelector<RootState, FilterBarOrientation>(
|
const filterBarOrientation = useSelector<RootState, FilterBarOrientation>(
|
||||||
({ dashboardInfo }) => dashboardInfo.filterBarOrientation,
|
({ dashboardInfo }) =>
|
||||||
|
isFeatureEnabled(FeatureFlag.HORIZONTAL_FILTER_BAR)
|
||||||
|
? dashboardInfo.filterBarOrientation
|
||||||
|
: FilterBarOrientation.VERTICAL,
|
||||||
);
|
);
|
||||||
|
|
||||||
const handleChangeTab = useCallback(
|
const handleChangeTab = useCallback(
|
||||||
|
|
|
@ -26,6 +26,8 @@ import {
|
||||||
SupersetTheme,
|
SupersetTheme,
|
||||||
t,
|
t,
|
||||||
isNativeFilter,
|
isNativeFilter,
|
||||||
|
isFeatureEnabled,
|
||||||
|
FeatureFlag,
|
||||||
} from '@superset-ui/core';
|
} from '@superset-ui/core';
|
||||||
import {
|
import {
|
||||||
createHtmlPortalNode,
|
createHtmlPortalNode,
|
||||||
|
@ -56,7 +58,10 @@ const FilterControls: FC<FilterControlsProps> = ({
|
||||||
onFilterSelectionChange,
|
onFilterSelectionChange,
|
||||||
}) => {
|
}) => {
|
||||||
const filterBarOrientation = useSelector<RootState, FilterBarOrientation>(
|
const filterBarOrientation = useSelector<RootState, FilterBarOrientation>(
|
||||||
state => state.dashboardInfo.filterBarOrientation,
|
({ dashboardInfo }) =>
|
||||||
|
isFeatureEnabled(FeatureFlag.HORIZONTAL_FILTER_BAR)
|
||||||
|
? dashboardInfo.filterBarOrientation
|
||||||
|
: FilterBarOrientation.VERTICAL,
|
||||||
);
|
);
|
||||||
|
|
||||||
const [overflowedIds, setOverflowedIds] = useState<string[]>([]);
|
const [overflowedIds, setOverflowedIds] = useState<string[]>([]);
|
||||||
|
|
Loading…
Reference in New Issue