HxAutosuggest

Component for single item selection with dynamic suggestions (based on typed characters).

Current value: 1033

API

Parameters

Name Type Description
DataProvider AutosuggestDataProviderDelegate<string> Method (delegate) which provides data of the suggestions.
ValueSelector Func<string, string> Selects value from item. Not required when TValueType is same as TItemTime.
TextSelector Func<string, string> Selects text to display from item. When not set ToString() is used.
ItemTemplate RenderFragment<string> Template to display item. When not set, TextSelector is used.
EmptyTemplate RenderFragment Template to display when items are empty.
SearchIcon IconBase Icon displayed in input when no item is selected.
ClearIcon IconBase Icon displayed in input on selection clear button when item is selected.
MinimumLength int? Minimal number of characters to start suggesting.
Delay int? Debounce delay in miliseconds.
Placeholder string Short hint displayed in the input field before the user enters a value.
InputSize InputSize?
LabelType LabelType? Label type.
ItemFromValueResolver Func<string, Task<string>> Returns corresponding item for (select) Value.
Label string Label to render before input (or after input for Checkbox).
LabelTemplate RenderFragment Label to render before input (or after input for Checkbox).
Hint string Hint to render after input as form-text.
HintTemplate RenderFragment Hint to render after input as form-text.
CssClass string Custom CSS class to render with wrapping div.
LabelCssClass string Custom CSS class to render with the label.
InputCssClass string Custom CSS class to render with the input element.
ShowValidationMessage bool When false, validation message is not rendered. Default is true.
GenerateChip bool When true, HxChipGenerator is used to generate chip item(s). Default is true.
ChipTemplate RenderFragment Chip template.
Enabled bool? When null (default), the Enabled value is received from cascading FormState. When value is false, input is rendered as disabled. To set multiple controls as disabled use HxFormState.
AdditionalAttributes IReadOnlyDictionary<string, object>
Value string
ValueExpression Expression<Func<string>>
DisplayName string

Event Callbacks

Name Type Description
ValueChanged EventCallback<string>

Methods

Method Returns Description
FocusAsync() ValueTask Gives focus to the input element.
An unhandled error has occurred. Reload 🗙