Skip to content

Commit

Permalink
Force vertical filter bar when FF off.
Browse files Browse the repository at this point in the history
  • Loading branch information
codyml committed Nov 29, 2022
1 parent fb3e717 commit a58aaa5
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 a58aaa5

Please sign in to comment.