This section describes the different ways to apply the four filters provided by the
grid - Text Filter,
Number Filter,
Date Filter
and Set Filter.
Each of the provided filters can optionally include Apply, Clear, Reset and Cancel buttons.
When the Apply
button is used, the filter is only applied once the Apply button is pressed. This is useful if the
filtering operation will take a long time because the dataset is large, or if using server-side filtering (thus
preventing unnecessary calls to the server). Pressing <kbd>↵ Enter<kbd> is equivalent to pressing the Apply button.
The Clear
button clears just the filter UI, whereas the Reset
button clears the filter UI and removes any active
filters for that column.
The Cancel
button will discard any changes that have been made in the UI, restoring the state of the filter to match
the applied model.
The buttons will be displayed in the order they are specified in the buttons array.
The example below demonstrates using the different buttons. It also demonstrates the relationship between the buttons
and filter events. Note the following:
closeOnApply
set to True
, so the filter popup will be closed immediatelyNote the expected behaviour when clicking the filter popup buttons:
closeOnApply
set to True
.closeOnApply
set to True
and Apply button is present.closeOnApply
set to True
.All the provided filters have the following parameters:
buttons
Specifies the buttons to be shown in the filter, in the order they should be displayed in. The options are:closeOnApply
(boolean, default: False) If the Apply button is present, the filter popup will be closed immediately when the Apply orTrue
.debounceMs
(number) Overrides the default debounce time in milliseconds for the filter. Defaults are:readOnly
(boolean, default: False) If set to True
, disables controls in the filter to mutate its state. Normally this would be used