mirror of
https://gitee.com/LongbowEnterprise/BootstrapBlazor.git
synced 2024-12-02 03:59:14 +08:00
fix(Table): ShowColumnList item incorrect if remove column by OnColumnCreating (#3688)
* fix: 修复 OnColumnCreating 顺序不正确问题 * chore: bump version 8.6.3-beta04
This commit is contained in:
parent
ab0bb74de5
commit
7a32c21cf5
@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.Razor">
|
||||
|
||||
<PropertyGroup>
|
||||
<Version>8.6.3-beta03</Version>
|
||||
<Version>8.6.3-beta04</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup Condition="'$(TargetFramework)' == 'net5.0'">
|
||||
|
@ -978,16 +978,22 @@ public partial class Table<TItem> : ITable, IModelEqualityComparer<TItem> where
|
||||
{
|
||||
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 @@ public partial class Table<TItem> : ITable, IModelEqualityComparer<TItem> where
|
||||
SortOrder = col.DefaultSortOrder;
|
||||
}
|
||||
|
||||
if (OnColumnCreating != null)
|
||||
{
|
||||
await OnColumnCreating(Columns);
|
||||
}
|
||||
|
||||
// 获取是否自动查询参数值
|
||||
_autoQuery = IsAutoQueryFirstRender;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user