From dc7433abb8dd461641be14cc925dbac816aaed19 Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Wed, 19 Jun 2024 14:24:39 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=20OnColumnCreatin?= =?UTF-8?q?g=20=E9=A1=BA=E5=BA=8F=E4=B8=8D=E6=AD=A3=E7=A1=AE=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Components/Table/Table.razor.cs | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/BootstrapBlazor/Components/Table/Table.razor.cs b/src/BootstrapBlazor/Components/Table/Table.razor.cs index 803eb0f49f1..01eb61d4805 100644 --- a/src/BootstrapBlazor/Components/Table/Table.razor.cs +++ b/src/BootstrapBlazor/Components/Table/Table.razor.cs @@ -978,16 +978,22 @@ private async Task ProcessFirstRender() { cols = ColumnOrderCallback(cols).ToList(); } + await ReloadColumnOrdersFromBrowserAsync(cols); Columns.Clear(); Columns.AddRange(cols.OrderFunc()); - InternalResetVisibleColumns(); - // 查看是否开启列宽序列化 _clientColumnWidths = await ReloadColumnWidthFromBrowserAsync(); ResetColumnWidth(); + if (OnColumnCreating != null) + { + await OnColumnCreating(Columns); + } + + InternalResetVisibleColumns(); + // set default sortName var col = Columns.Find(i => i is { Sortable: true, DefaultSort: true }); if (col != null) @@ -996,11 +1002,6 @@ private async Task ProcessFirstRender() SortOrder = col.DefaultSortOrder; } - if (OnColumnCreating != null) - { - await OnColumnCreating(Columns); - } - // 获取是否自动查询参数值 _autoQuery = IsAutoQueryFirstRender; From 99be635b835291501ce6b629b606270c5522d892 Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Wed, 19 Jun 2024 14:25:23 +0800 Subject: [PATCH 2/2] chore: bump version 8.6.3-beta04 --- src/BootstrapBlazor/BootstrapBlazor.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/BootstrapBlazor/BootstrapBlazor.csproj b/src/BootstrapBlazor/BootstrapBlazor.csproj index 0459ed4a65a..ec990f09ca3 100644 --- a/src/BootstrapBlazor/BootstrapBlazor.csproj +++ b/src/BootstrapBlazor/BootstrapBlazor.csproj @@ -1,7 +1,7 @@ - 8.6.3-beta03 + 8.6.3-beta04