On OnInitializedAsync() I entered the initializations of the Combos and on OnAfterRenderAsync(bool firstRender) I entered: if (firstRender)
{
ToolbarItems = ToolbarDetails.ToolbarItems;
await SetToolbarItemsAsync();
StateHasChanged();
}
if (firstRender || isFocusOnFirstElement)
{
// await code.FocusAsync();
await Start.FocusAsync();
isFocusOnFirstElement = false;
}
It happens to me that when I go to Editing, I see that the focus is positioned quickly on the first field but then it is removed and disappears when the data is loaded; I noticed that commenting the initialization of the combos works the other way around. but how come? The focus field is a date field so a sfdatepicker. Thank you