Set Filter - Mini Filter
This section describes the behaviour of the Mini Filter and shows how it can be configured.
The Mini Filter allows the user to search for particular values in the Filter List. Entering text into the Mini Filter will narrow down the presented list of values shown inside the Set Filter, but by default will not filter the data inside the grid.
Enter key is pressed while on the Mini Filter, the Set Filter will exclusively select all
values in the Filter List that pass the Mini Filter and apply the filter immediately (note that even if an Apply
Button is used, hitting
Enter applies the filter).
Alternatively, you can choose to have the Mini Filter applied as the user is typing, i.e. as the Filter List is filtered, the Set Filter will be applied as described above so that the results in the grid will also be filtered at the same time. To enable this behaviour, use the following:
The following example demonstrates this behaviour. Note the following:
The Athlete column's Set Filter shows the Mini Filter with default behaviour. Try typing in the Mini Filter to
search the Filter List, and then hit the
Enterkey and notice how the grid is filtered using the displayed values.
The Country column's Set Filter applies the Mini Filter as you type as
filterParams.applyMiniFilterWhileTyping = true.
Sometimes it is necessary to provide custom handling for Mini Filter searches, for example to substitute accented characters or to perform case-sensitive searches.
As with the Text Filter it is possible to supply a Text Formatter to the Set Filter which formats the text before applying the Mini Filter compare logic. The snippet below shows how this can be configured:
The following example demonstrates searching when there are accented characters. Note the following:
The Athlete column's Set filter is supplied a text formatter via
filterParams.textFormatterto ignore accents.
'bjorn'will return all values containing
Text used in the Mini Filter can be customised using Localisation.
The text shown as a placeholder in the Mini Filter textbox can be customised by setting
When no matching values are found when typing in the Mini Filter, a message is displayed. This can be customised by
The example below shows this text being customised.
Hiding the Mini Filter
By default, the Mini Filter is shown whenever the Set Filter is used. If you would like to hide it, you can use the following:
The following example demonstrates hiding the mini filter. Note the following:
- The Athlete column's Set Filter shows the Mini Filter by default.
The Country column's Set Filter does not have a Mini Filter as
filterParams.suppressMiniFilter = true.
Continue to the next section: Set Filter API.