A component that lets you suggest and complete text as users type, based on a data source. Supports filtering (operators, min length), debounced input, item templates, open/close events, clear button, and prefix/suffix content.
Definition
Namespace:Telerik.Blazor.Components
Assembly:Telerik.Blazor.dll
Type Parameters:
TItem
Syntax:
public class TelerikAutoComplete<TItem> : TelerikSelectBase<TItem, string>, IComponent, IHandleEvent, IHandleAfterRender, IDisposable, IPopupContainer
Inheritance: objectComponentBaseBaseComponentDataBoundComponent<TItem>TelerikSelectBase<TItem, string>TelerikAutoComplete<TItem>...
Implements:
Inherited Members
Constructors
public TelerikAutoComplete()
Methods
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Overrides:
Properties
The content of the AutoComplete prefix. Children: allows arbitrary content.
[Parameter]
public RenderFragment AutoCompletePrefixTemplate { get; set; }
Defines a renderfragment that contains all settings for the autocomplete. AutoCompletePopupSettings. Children: AutoCompletePopupSettings.
[Parameter]
public RenderFragment AutoCompleteSettings { get; set; }
The content of the AutoComplete suffix. Children: allows arbitrary content.
[Parameter]
public RenderFragment AutoCompleteSuffixTemplate { get; set; }
Time in ms between the last typed symbol and the firing of the internal oninput event. Default is 150ms.
[Parameter]
public int DebounceDelay { get; set; }
Enables WebMCP tool registration for this AutoComplete.
When true, AutoComplete operations are exposed as tools discoverable by AI models through the browser.
Default value is false.
[Parameter]
public bool EnableWebMcpTools { get; set; }
Defines the filter operator. Default value is StringFilterOperator.StartsWith.
[Parameter]
public StringFilterOperator FilterOperator { get; set; }
ItemTemplate
RenderFragment<TItem>
Defines the item template of the list items. Children: allows arbitrary content.
[Parameter]
public RenderFragment<TItem> ItemTemplate { get; set; }
The delay after which the loader in the suggestion list will be displayed.
[Parameter]
public int LoaderShowDelay { get; set; }
Defines minimum number of characters in the input before suggestions are displayed.
[Parameter]
public int MinLength { get; set; }
Defines the OnClose Event which is fired before the suggestion list of the AutoComplete is closed.
[Parameter]
public EventCallback<AutoCompleteCloseEventArgs> OnClose { get; set; }
Fires each time an item in dropdown renders. Use the event to add a custom CSS class to each dropdown item based on its value.
[Parameter]
public Action<AutoCompleteItemRenderEventArgs<TItem>> OnItemRender { get; set; }
Defines the OnOpen Event which is fired before the suggestion list of the AutoComplete is opened.
[Parameter]
public EventCallback<AutoCompleteOpenEventArgs> OnOpen { get; set; }
Fires when the data source is read. Use this to attach your own filtering logic. Once attached, you must implement all such data source operations here, the Component will no longer perform them for you.
[Parameter]
public EventCallback<AutoCompleteReadEventArgs> OnRead { get; set; }
The hint that is shown if no there is no value.
[Parameter]
public string Placeholder { get; set; }
Defines whether to render a clear button in the AutoComplete. Clear Button is displayed on hover when the AutoComplete has value.
[Parameter]
public bool ShowClearButton { get; set; }
Defines whether the prefix separator should be shown. The default value is true.
[Parameter]
public bool ShowPrefixSeparator { get; set; }
Defines whether the suffix separator should be shown. The default value is true.
[Parameter]
public bool ShowSuffixSeparator { get; set; }