The focus on the first field is not set correctly

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


1 Reply

VD Vinitha Devi Murugan Syncfusion Team May 26, 2023 01:43 PM UTC

Hi Biagio,


We could not clearly understand your issue from your previous post and the shared details. Please share additional information, such as a video demo clearly illustrating the problem, as well as a simple issue replication sample, so that we may better assist you. We are eager to provide you with the best service possible.


Regards,

Vinitha


Loader.
Up arrow icon