Skip to content

Commit

Permalink
fix(dashboard): Force native filters into vertical orientation when F…
Browse files Browse the repository at this point in the history
…F off (#22265)
  • Loading branch information
codyml authored Nov 29, 2022
1 parent a642d12 commit 969c963
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,10 @@ const DashboardBuilder: FC<DashboardBuilderProps> = () => {
state => state.dashboardState.fullSizeChartId,
);
const filterBarOrientation = useSelector<RootState, FilterBarOrientation>(
({ dashboardInfo }) => dashboardInfo.filterBarOrientation,
({ dashboardInfo }) =>
isFeatureEnabled(FeatureFlag.HORIZONTAL_FILTER_BAR)
? dashboardInfo.filterBarOrientation
: FilterBarOrientation.VERTICAL,
);

const handleChangeTab = useCallback(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ import {
SupersetTheme,
t,
isNativeFilter,
isFeatureEnabled,
FeatureFlag,
} from '@superset-ui/core';
import {
createHtmlPortalNode,
Expand Down Expand Up @@ -56,7 +58,10 @@ const FilterControls: FC<FilterControlsProps> = ({
onFilterSelectionChange,
}) => {
const filterBarOrientation = useSelector<RootState, FilterBarOrientation>(
state => state.dashboardInfo.filterBarOrientation,
({ dashboardInfo }) =>
isFeatureEnabled(FeatureFlag.HORIZONTAL_FILTER_BAR)
? dashboardInfo.filterBarOrientation
: FilterBarOrientation.VERTICAL,
);

const [overflowedIds, setOverflowedIds] = useState<string[]>([]);
Expand Down

0 comments on commit 969c963

Please sign in to comment.