File tree Expand file tree Collapse file tree 2 files changed +12
-13
lines changed
grade-management-new/GradeManagement.Client Expand file tree Collapse file tree 2 files changed +12
-13
lines changed Original file line number Diff line number Diff line change 2424
2525 public async Task StartLoading ()
2626 {
27- if ( LongTask != null )
27+ _ = Task . Run ( async () =>
2828 {
29- IsLoading = true ;
30- StateHasChanged ();
31- await LongTask ();
32- IsLoading = false ;
33- StateHasChanged ();
34- }
29+ await Task .Delay (1 ); // Delay for 100 milliseconds
30+ if (LongTask != null )
31+ {
32+ IsLoading = true ;
33+ StateHasChanged ();
34+ await LongTask ();
35+ IsLoading = false ;
36+ StateHasChanged ();
37+ }
38+ });
3539 }
3640
3741}
Original file line number Diff line number Diff line change 7878 {
7979 await UserClient .UpdateAsync (items .Id , items );
8080 SnackbarService .ShowEditSuccess ();
81- // Run the StartLoading method asynchronously after a short delay
82- _ = Task .Run (async () =>
83- {
84- await Task .Delay (1 ); // Delay for 100 milliseconds
85- await loadingComponentRef .StartLoading ();
86- });
81+ await loadingComponentRef .StartLoading ();
8782 }
8883
8984 private async Task DeleteItem (User item )
You can’t perform that action at this time.
0 commit comments