New to Telerik UI for Blazor? Download Free 30-day trial
MultiSelect - Filtering
- EXAMPLE
- VIEW SOURCE
- EDIT IN TELERIK REPL
- Change Theme
default
Enable filtering
Close on select
Perist filter on select
Select the filter operator
ContainsDebounce Delay
Minimum input length to show popup
- Filtering.razor
Description
The Telerik UI for Blazor MultiSelect component allows the user to select multiple values from a list of suggestions. In some scenarios, this list can be long and you might want to display only specific options to the user. The MultiSelect supports filtering functionality to cover such scenarios. This feature allows you to filter the available suggestions according to the current user input, so they can find the one they need faster.
By default, the MultiSelect filtering is disabled. You can enable the filtering by setting the Filterable
parameter of the component to true
. Additionally, the filtering functionality of the MultiSelect supports custom configurations. For example:
- Set the desired filter operator – by default, the options will be filtered by filter operator
StartsWith
. You can configure that and choose another operator from theStringFilterOperator
enum. Provide the desired option to theFilterOperator
parameter of the Blazor MultiSelect. - Debounce the filtering – the component has a default debounce delay of 150ms. This will also debounce the filtering when enabled. It is possible to configure that through the
DebounceDelay
parameter of the Blazor MultiSelect. - Persist the filter on selection – by default, when the user selects an item, the filter value is cleared from the input. You can preserve the filter upon selection by setting the
PersistFilterOnSelect
parameter of the component totrue
. This will allow the user to select multiple values that match one filter criterion.
This demo showcases a filterable Blazor MultiSelect that persists the filter and keeps the popup open upon selection. It allows you to configure and test the filtering capabilities. Use the DropDownList in the Configurator section to alter the applied DebounceDelay
value and explore the debouncing behavior. Choose a different filter operator from the dropdown to see how this affects the options displayed in the Blazor MultiSelect popup. Alter the minimum input length before the popup is shown.
The component also provides a NoDataTemplate
. Use it to customize the dropdown content when there are no items to display.