mirror of
https://github.com/PacktPublishing/Web-Development-with-Blazor-Second-Edition.git
synced 2026-04-07 15:23:56 +00:00
8 lines
158 B
Text
8 lines
158 B
Text
|
|
@page "/setfocus"
|
||
|
|
|
||
|
|
<input @ref="textInput" />
|
||
|
|
<button @onclick="() => textInput.FocusAsync()">Set focus</button>
|
||
|
|
|
||
|
|
@code {
|
||
|
|
ElementReference textInput;
|
||
|
|
}
|