Current Behavior
The filter icon in table toolbars (UniversalFilter component) shows no indication of how many filters are currently active. Users have to open the filter dropdown to see if any filters are applied.
Desired Behavior
Show a badge on the filter icon displaying the number of active (non-default) filters so users can see at a glance whether filters are applied without opening the dropdown.
Implementation
Wrap the filter icon (FilterIcon / TooltipIcon) with a MUI Badge component that displays the count of active filter values (where the value is not "All"). This was previously implemented in the feat/datatable-toolbar branch and then removed. The active count can be derived from selectedFilters as:
const activeFilterCount = Object.values(selectedFilters).filter(
(value) => value !== 'All'
).length;
Acceptance Tests
Mockups
Contributor Guide
Current Behavior
The filter icon in table toolbars (UniversalFilter component) shows no indication of how many filters are currently active. Users have to open the filter dropdown to see if any filters are applied.
Desired Behavior
Show a badge on the filter icon displaying the number of active (non-default) filters so users can see at a glance whether filters are applied without opening the dropdown.
Implementation
Wrap the filter icon (
FilterIcon/TooltipIcon) with a MUIBadgecomponent that displays the count of active filter values (where the value is not"All"). This was previously implemented in thefeat/datatable-toolbarbranch and then removed. The active count can be derived fromselectedFiltersas:Acceptance Tests
Mockups
Contributor Guide