Autocomplete
FreeText field that filters a list while you type. Supports the arrow keys, Enter and Escape and follows the ARIA combobox pattern. The value is always one of the items.
Example

Parameters
| Parameter | Type | Description |
|---|---|---|
Class | string | Extra CSS classes added to the root element. |
DebounceMilliseconds | int | Wait after the last key before ItemsProvider is called (default 250). |
Disabled | bool | Disables interaction. |
DisplayName | string | Name used in validation messages. |
GroupBy | Func<string, string> | Returns the group heading of an item; items are listed under their headings. |
HelperText | string | Hint shown below the field. |
Items | IEnumerable<string> | The options to choose from. |
ItemsProvider | Func<string, CancellationToken, Task<IEnumerable<string>>> | Loads the matches for the typed text (text, cancellation token); used instead of Items. |
ItemText | Func<string, string> | Converts an item to its display text (defaults to ToString()). |
Label | string | Visible label text (charts: accessible name; IconButton: accessible name and tooltip). |
ListHeader | RenderFragment | |
MatchText | Func<string, string> | |
MaxItems | int | Largest number of suggestions shown. For Autocomplete and a searchable Select 0 (the default) shows every match of a fixed list and the first 10 results of an ItemsProvider; Breadcrumbs, Mention and MultiColumnComboBox have their own defaults. |
MinChars | int | Characters required before suggestions appear. |
OptionTemplate | RenderFragment<string> | Custom content for each option. The item is available as context. |
Placeholder | string | Placeholder shown when the field is empty. |
ReadOnly | bool | Shows the value but does not allow changes. |
ShowToggle | bool | Adds a button that opens the full list. |
Style | string | Inline style added to the root element. |
Value | string | Current value. Use with @bind-Value. |
Events
| Event | Type | Description |
|---|---|---|
ValueChanged | EventCallback<string> | Raised when the value changes. |
Package
Autocomplete is part of RayCraft Free. Package: RayCraft.Blazor. It comes from nuget.org. See Getting started.
Send feedbackVersion 1.0.3