Welcome to the Blazor feedback portal. We’re happy you’re here! If you have feedback on how to improve the Blazor, we’d love to hear it!>
Thanks for joining our community and helping improve Syncfusion products!
I planned to use the spinner to indicate that a relative long running service is being called. This service is called the moment the page opens (using the OnAfterRenderAsync() method). See the code below:
@code {
SfSpinner SpinnerObj;
protected async override Task OnAfterRenderAsync(bool firstRender)
{
if (firstRender)
{
await StartLongRunningServiceCall();
}
await base.OnAfterRenderAsync(firstRender);
}
private async Task StartLongRunningServiceCall()
{
//await Task.Delay(1000); <= remove remark to get it working
SpinnerObj.ShowSpinner("#container");
// simulate long running call
await Task.Delay(2500);
SpinnerObj.HideSpinner("#container");
}
}The only way to get is working is to wait for a second (or so) before I show the spinner.
Is this a bug? Or am I using the spinner wrong?