diff --git a/superset-frontend/src/components/ListView/Filters/CompactSelectPanel.tsx b/superset-frontend/src/components/ListView/Filters/CompactSelectPanel.tsx index a538d91f386..8cd902e9c0c 100644 --- a/superset-frontend/src/components/ListView/Filters/CompactSelectPanel.tsx +++ b/superset-frontend/src/components/ListView/Filters/CompactSelectPanel.tsx @@ -57,7 +57,6 @@ const PanelContainer = styled.div` display: flex; flex-direction: column; border-radius: ${theme.borderRadiusLG}px; - overflow: hidden; background: ${theme.colorBgElevated}; box-shadow: ${theme.boxShadowSecondary}; padding: ${theme.paddingXXS}px 0; @@ -84,7 +83,6 @@ const OptionItem = styled.li<{ $active: boolean }>` align-items: center; justify-content: space-between; padding: 5px ${theme.sizeUnit * 3}px; - min-height: ${theme.controlHeight}px; cursor: pointer; font-size: ${theme.fontSize}px; color: ${theme.colorText}; diff --git a/superset-frontend/src/components/ListView/Filters/index.tsx b/superset-frontend/src/components/ListView/Filters/index.tsx index 9381e188312..2ab71e3b2e6 100644 --- a/superset-frontend/src/components/ListView/Filters/index.tsx +++ b/superset-frontend/src/components/ListView/Filters/index.tsx @@ -49,7 +49,10 @@ interface UIFiltersProps { function UIFilters( { filters, internalFilters = [], updateFilterValue }: UIFiltersProps, - ref: RefObject<{ clearFilters: () => void; clearFilterById: (id: string) => void }>, + ref: RefObject<{ + clearFilters: () => void; + clearFilterById: (id: string) => void; + }>, ) { const filterRefs = useMemo( () => @@ -65,8 +68,11 @@ function UIFilters( useImperativeHandle(ref, () => ({ clearFilters: () => { - filterRefs.forEach(filter => { + filterRefs.forEach((filter, index) => { filter.current?.clearFilter?.(); + // Direct reset as safety net — ensures URL updates even if the ref + // is stale (e.g. filter value was hydrated from URL after page refresh). + updateFilterValue(index, undefined); }); setTooltipLabels({}); }, @@ -74,6 +80,7 @@ function UIFilters( const index = filters.findIndex(f => f.id === id); if (index >= 0) { filterRefs[index]?.current?.clearFilter?.(); + updateFilterValue(index, undefined); setTooltipLabels(prev => { const next = { ...prev }; delete next[index];