kgabryje commented on code in PR #33831:
URL: https://github.com/apache/superset/pull/33831#discussion_r2426503294
##########
superset-frontend/src/dashboard/components/nativeFilters/FilterBar/Vertical.tsx:
##########
@@ -159,35 +166,84 @@ const VerticalFilterBar: FC<VerticalBarProps> = ({
() => ({ overflow: 'auto', height, overscrollBehavior: 'contain' }),
[height],
);
+ const chartCustomizationItems = useSelector<
+ RootState,
+ ChartCustomizationItem[]
+ >(state => selectChartCustomizationItems(state));
- const filterControls = useMemo(
- () =>
- filterValues.length === 0 ? (
- <FilterBarEmptyStateContainer>
- <EmptyState
- size="small"
- title={t('No global filters are currently added')}
- image="filter.svg"
- description={
- canEdit &&
- t(
- 'Click on "Add or Edit Filters" option in Settings to create
new dashboard filters',
- )
- }
- />
- </FilterBarEmptyStateContainer>
- ) : (
- <FilterControlsWrapper>
- <FilterControls
- dataMaskSelected={dataMaskSelected}
- onFilterSelectionChange={onSelectionChange}
- clearAllTriggers={clearAllTriggers}
- onClearAllComplete={onClearAllComplete}
- />
- </FilterControlsWrapper>
- ),
- [canEdit, dataMaskSelected, filterValues.length, onSelectionChange],
+ const dataMask = useSelector<RootState, DataMaskStateWithId>(
+ state => state.dataMask,
);
+ const chartIds = useChartIds();
+ const chartLayoutItems = useChartLayoutItems();
+ const verboseMaps = useChartsVerboseMaps();
+ const selectedCrossFilters = crossFiltersSelector({
+ dataMask,
+ chartIds,
+ chartLayoutItems,
+ verboseMaps,
+ });
+
+ // Determine available section types
+ const availableSectionTypes = useMemo(() => {
+ const types = [];
+
+ if (filterValues.length > 0) {
+ types.push('filters');
Review Comment:
could this be an enum?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]