public void Show(LoadingOption option) { if (LoadingOptions.Any(x => x.Target.Id == option.Target.Id)) { return; } LoadingOptions.Add(option); }
internal async Task CurrentPageChangedAsync(int page) { CurrentPage = page; if (CurrentPageChanged.HasDelegate) { RequireRender = true; var option = new LoadingOption() { Background = LoadingBackground, Target = Container, IconClass = LoadingIconClass, Text = LoadingText }; LoadingService.LoadingOptions.Add(option); SelectedRows.Clear(); await CurrentPageChanged.InvokeAsync(page); LoadingService.LoadingOptions.Remove(option); } }
async Task ShowFullScreenLoadingAsync(LoadingOption option) { await Document.AppendAsync(option.Element); await Document.DisableScrollAsync(); var style = option.Element.Dom(JSRuntime).Style; await style.SetAsync("display", "none"); await style.SetAsync("width", "100%"); await style.SetAsync("height", "100%"); await style.SetAsync("position", "fixed"); await style.SetAsync("top", "0"); await style.SetAsync("bottom", "0"); await style.SetAsync("display", "block"); }
async Task CloseFullScreenLoadingAsync(LoadingOption option) { await Document.EnableYScrollAsync(); }