Set Filter - Overview
The Set Filter takes inspiration from Excel's AutoFilter and allows filtering on sets of data. It is built on top of the shared functionality that is common across all Provided Filters.
Set Filter Sections
The Set Filter is comprised of the following sections:
- Mini Filter: used to narrow the values available for selection inside the Filter List.
- Select All: used to select / deselect all values shown in the Filter List.
- Filter List: a list of Set Filter Values which can be selected / deselected to set the filter.
- Filter Buttons: Action buttons that can be optionally added to the bottom of the Set Filter.
Enabling Set Filters
The Set Filter is the default filter used in ag-Grid Enterprise, but it can also be explicitly configured as shown below:
The following example demonstrates how the Set Filter can be enabled. Note the following:
The Athlete column has
filter=truewhich defaults to the Set Filter as this example is using ag-Grid Enterprise.
The Country column is explicitly configured to use the Set Filter using
All other columns are configured to use the Number Filter
- Filters can be accessed from the Column Menu or by clicking on the filter icon in the Floating Filters.
Set Filter Parameters
Parameters that are common to all Provided Filters:
|Specifies the buttons to be shown in the filter, in the order they should be displayed in. The options are: |
|If the Apply button is present, the filter popup will be closed immediately when the Apply or Reset button is clicked if this is set to |
|By default the Text and Number filters will debounce by 500ms. This is because these filters have text field inputs, so time is given to the user to type items in. The Set and Date will execute immediately (no debounce). To override these defaults, set |
|This property is for when using the Client Side Row Model only. When set to |
Parameters that are specific to the Set Filter:
|Set to |
|The height of values in the Filter List in pixels.|
|Similar to the Cell Renderer for the grid. Setting it separately here allows for the value to be rendered differently in the filter. See Filter List Cell Renderer.|
|Comparator for sorting. If not provided, the Column Definition comparator is used. If Column Definition comparator is also not provided, the default (grid provided) comparator is used. See Sorting Filter Lists.|
|By default, when the Set Filter is opened all values are shown selected. Set this to |
|Changes the behaviour of the Set Filter to match that of Excel's AutoFilter. See Excel Mode.|
|Set to |
|Set to |
|If specified, this formats the text before applying the Mini Filter compare logic, useful for instance if substituting accented characters or if you want to perform case-sensitive Mini Filtering. See Custom Searches.|
|The values to display in the Filter List. If this is not set, the filter will takes its values from what is loaded in the table. See Supplying Filter Values.|
Continue to the next section: Filter List.