I am trying to set focus on a TelerikTextBox when a window is opened, but it would appear the call to js is being made before the window actually opens so the element is null.
Is there anyway to wait until the window is actually open and then call js to set focus on the textbox?
private async Task NewTicketClick()
{
newTicket = new NewTicketViewModel
{
CreatedBy = userId,
Owner = userId
};
showNewTicketWindow = true;
await jSRuntime.InvokeVoidAsync("focusInputFromBlazor", new[] { ".defaultFocus" });
}