diff --git a/src/BootstrapBlazor/BootstrapBlazor.csproj b/src/BootstrapBlazor/BootstrapBlazor.csproj index aae137acf75..af5fbbed25f 100644 --- a/src/BootstrapBlazor/BootstrapBlazor.csproj +++ b/src/BootstrapBlazor/BootstrapBlazor.csproj @@ -1,7 +1,7 @@  - 10.6.1-beta21 + 10.6.1-beta22 diff --git a/src/BootstrapBlazor/Components/Table/Table.razor.Toolbar.cs b/src/BootstrapBlazor/Components/Table/Table.razor.Toolbar.cs index ba9be85bb96..383b082bae0 100644 --- a/src/BootstrapBlazor/Components/Table/Table.razor.Toolbar.cs +++ b/src/BootstrapBlazor/Components/Table/Table.razor.Toolbar.cs @@ -561,13 +561,13 @@ private void ResetVisibleColumnsCache() for (var index = 0; index < _tableColumnStates.Count; index++) { var item = _tableColumnStates[index]; - if (item.Visible) + var col = Columns.Find(c => c.GetFieldName() == item.Name); + if (col != null) { - var col = Columns.Find(c => c.GetFieldName() == item.Name); - if (col != null) - { - item.DisplayName = col.GetDisplayName(); + item.DisplayName = col.GetDisplayName(); + if (item.Visible) + { // 增加到可见列缓存集合 _visibleColumnsCache.Add(col); }