Created
November 15, 2021 19:08
-
-
Save pawelel/d88ee237e740474e7b143e4594d2fc85 to your computer and use it in GitHub Desktop.
lowly tarnished frog shared code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<MudTextField @ref="field" | |
@bind-Value="_searchValue" | |
KeyUpPreventDefault="true" | |
OnKeyUp="OnKeyUp"/> | |
@code { | |
private string _searchValue = string.Empty; | |
MudTextField<string> field; | |
private void OnKeyUp(KeyboardEventArgs args) | |
{ | |
if (args.Key == "Enter") | |
{ | |
Console.WriteLine(_searchValue); | |
field.Clear(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment