BlockeeR
BlockeeR

Reputation: 241

MudBlazor - Search table onkeypress

I am trying to figure out how I can apply "search as you type" feature to the MudTextField component using the MudBlazor table component. As of now, it searches only when enter key is pressed as seen here - MudBlazor Table Example

Upvotes: 4

Views: 2825

Answers (1)

Eric King
Eric King

Reputation: 11734

Use Immediate="true" on the search box component to trigger the search on each keystroke. Like so:

<MudTextField @bind-Value="searchString" Immediate="true" Placeholder="Search" Adornment="Adornment.Start" AdornmentIcon="@Icons.Material.Filled.Search" IconSize="Size.Medium" Class="mt-0"></MudTextField>

Upvotes: 12

Related Questions