diff --git a/src/BootstrapBlazor/BootstrapBlazor.csproj b/src/BootstrapBlazor/BootstrapBlazor.csproj index 3aa578101..fcff9a905 100644 --- a/src/BootstrapBlazor/BootstrapBlazor.csproj +++ b/src/BootstrapBlazor/BootstrapBlazor.csproj @@ -1,7 +1,7 @@ - 6.6.17 + 6.6.18 diff --git a/src/BootstrapBlazor/Components/Table/Table.razor.Toolbar.cs b/src/BootstrapBlazor/Components/Table/Table.razor.Toolbar.cs index d2cb94555..d3e5287c6 100644 --- a/src/BootstrapBlazor/Components/Table/Table.razor.Toolbar.cs +++ b/src/BootstrapBlazor/Components/Table/Table.razor.Toolbar.cs @@ -230,8 +230,13 @@ public partial class Table private IEnumerable GetColumns() { // https://gitee.com/LongbowEnterprise/BootstrapBlazor/issues/I2LBM8 - var items = ColumnVisibles.Where(i => i.Visible); - return Columns.Where(i => items.Any(v => v.FieldName == i.GetFieldName())); + IEnumerable cols = Columns; + if (ColumnVisibles != null) + { + var items = ColumnVisibles.Where(i => i.Visible); + cols = Columns.Where(i => items.Any(v => v.FieldName == i.GetFieldName())); + } + return cols; } private bool GetColumnsListState(ITableColumn col)