diff --git a/src/BootstrapBlazor.Server/Locales/en-US.json b/src/BootstrapBlazor.Server/Locales/en-US.json index 56ac19e19e7..f426d1a8c56 100644 --- a/src/BootstrapBlazor.Server/Locales/en-US.json +++ b/src/BootstrapBlazor.Server/Locales/en-US.json @@ -5008,6 +5008,7 @@ "TablesSearchTitle": "Table Search" }, "BootstrapBlazor.Server.Components.Samples.Table.TablesSelection": { + "TablesSelectionCountText": "Count:{0}", "TablesSelectionDescription": "Set the table row state by setting SelectedRows, and set the highlight by selecting the style", "TablesSelectionKeepInfo": "Keep State:", "TablesSelectionKeepOffText": "No keep", diff --git a/src/BootstrapBlazor.Server/Locales/zh-CN.json b/src/BootstrapBlazor.Server/Locales/zh-CN.json index cb132bade5e..bbcb3dd69d1 100644 --- a/src/BootstrapBlazor.Server/Locales/zh-CN.json +++ b/src/BootstrapBlazor.Server/Locales/zh-CN.json @@ -5008,6 +5008,7 @@ "TablesSearchTitle": "Table 表格" }, "BootstrapBlazor.Server.Components.Samples.Table.TablesSelection": { + "TablesSelectionCountText": "选中的行数:{0}", "TablesSelectionDescription": "通过设置 SelectedRows 设置表格行状态,通过选中样式可以设置高亮", "TablesSelectionKeepInfo": "保持选中行状态:", "TablesSelectionKeepOffText": "不保持", diff --git a/src/BootstrapBlazor/BootstrapBlazor.csproj b/src/BootstrapBlazor/BootstrapBlazor.csproj index 3eef7f75957..01d235f3703 100644 --- a/src/BootstrapBlazor/BootstrapBlazor.csproj +++ b/src/BootstrapBlazor/BootstrapBlazor.csproj @@ -1,7 +1,7 @@  - 10.3.2-beta02 + 10.3.2-beta03 diff --git a/src/BootstrapBlazor/Components/Table/Table.razor.Checkbox.cs b/src/BootstrapBlazor/Components/Table/Table.razor.Checkbox.cs index e4ee8406bbf..aafa7caea66 100644 --- a/src/BootstrapBlazor/Components/Table/Table.razor.Checkbox.cs +++ b/src/BootstrapBlazor/Components/Table/Table.razor.Checkbox.cs @@ -105,7 +105,8 @@ protected CheckboxState HeaderCheckState() /// protected virtual async Task OnHeaderCheck(CheckboxState state, TItem val) { - SelectedRows.RemoveAll(Rows.Intersect(SelectedRows).Contains); + var items = Rows.Intersect(SelectedRows); + SelectedRows.RemoveAll(i => items.Any(item => Equals(item, i))); if (state == CheckboxState.Checked) { SelectedRows.AddRange(ShowRowCheckboxCallback == null ? Rows : Rows.Where(ShowRowCheckboxCallback));