You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: components/autocomplete/filter.md
+30-1Lines changed: 30 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,9 @@ position: 3
12
12
13
13
The AutoComplete component can filter the available suggestions according to the current user input, so they can find the one they need faster. To see the difference in behavior, visit the [Live Demo: AutoComplete Filtering](https://demos.telerik.com/blazor-ui/autocomplete/filtering) page.
14
14
15
-
To enable filtering, set the `Filterable` parameter to `true`. The filter operator is `starts with`, and it ignores casing.
15
+
To enable filtering, set the `Filterable` parameter to `true`.
16
+
17
+
Filtering ignores casing and the default filter operator is `starts with`. You can choose a different operator through the `FilterOperator` parameter that takes a member of the `Telerik.Blazor.StringFilterOperator` enum.
16
18
17
19
To control when the filter list appears, set the `MinLength` parameter. This can be useful if you have a very large list of data.
18
20
@@ -52,6 +54,33 @@ To control when the filter list appears, set the `MinLength` parameter. This can
52
54
}
53
55
````
54
56
57
+
58
+
>caption Choose FilterOperator
59
+
60
+
````CSHTML
61
+
<label>
62
+
Choose filter operator:
63
+
<select @bind="filterOperator">
64
+
@foreach (var possibleFilter in Enum.GetValues(typeof(StringFilterOperator)))
Copy file name to clipboardExpand all lines: components/autocomplete/overview.md
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -52,6 +52,7 @@ The AutoComplete is a generic component and its type is determined by the type o
52
52
*`Data` - allows you to provide the data source. Required.
53
53
*`Enabled` - whether the component is enabled.
54
54
*`Filterable` - whether [filtering]({%slug autocomplete-filter%}) is enabled for the end user (suggestions will get narrowed down as they type).
55
+
*`FilterOperator` - the string operation that will be used for [filtering]({%slug autocomplete-filter%}). Defaults to `StartsWith`.
55
56
*`MinLength` - how many characters the text has to be before the suggestions list appears. Cannot be `0`. Often works together with [filtering]({%slug autocomplete-filter%}).
56
57
*`Placeholder` - the text the user sees as a hint when there is no text in the input.
57
58
*`PopupHeight` - the height of the expanded dropdown list element.
0 commit comments