示例#1
0
        protected override async Task OnAfterRenderAsync(bool firstRender)
        {
            await base.OnAfterRenderAsync(firstRender);

            if (renderCompleted)
            {
                if (dataSourceUpdated)
                {
                    dataSourceUpdated = false;
                    await RefreshDataSourceAsync(AutoExpandAll);
                }
                return;
            }
            if (headerRendered)
            {
                renderCompleted = true;
                await(OnRenderCompleted?.Invoke(this) ?? Task.CompletedTask);
                return;
            }
            await RefreshDataSourceAsync(AutoExpandAll);

            headerRendered = true;
            RequireRender  = true;
            StateHasChanged();
        }
示例#2
0
 protected override async Task OnAfterRenderAsync(bool firstRender)
 {
     if (headerRendered)
     {
         await(OnRenderCompleted?.Invoke(this) ?? Task.CompletedTask);
         return;
     }
     headerRendered = true;
     RequireRender  = true;
     StateHasChanged();
 }