The FilterTemplate type is RenderFragment its value is a custom component, and the component must inherit the filterBase In this case, the last column in this case, the Quantity column, uses the custom component by filtering the template CustomerFilter [portal] CustomerFilter component source code
Notes:
FilterProvider, and FilterProvider must be under the FilterTemplate nodeFilterProvider component; for example, by setting ShowMoreButton to control whether the + - symbol is displayedv9.6.2, use OnFilterValueChanged to trigger the filter callback. After refactoring, use OnFilterAsync to trigger the filter callback method.Fixed property of the first two columns",
+ "TablesDynamicFixedColumnTitle": "Dynamic fixed columns",
+ "TablesDynamicFixedColumnUnfixButtonText": "Unfix the first two columns",
"TablesFixedColHeaderDescription": "In this example, set Name Education Count Complete The first two columns and the last column are fixed columns, and the middle columns are scrolled horizontally",
"TablesFixedColHeaderIntro": "Set the Fixed attribute to fix the header",
"TablesFixedColHeaderTitle": "Fixed column header and column footer",
diff --git a/src/BootstrapBlazor.Server/Locales/zh-CN.json b/src/BootstrapBlazor.Server/Locales/zh-CN.json
index ff54195d163..948c06e6381 100644
--- a/src/BootstrapBlazor.Server/Locales/zh-CN.json
+++ b/src/BootstrapBlazor.Server/Locales/zh-CN.json
@@ -729,7 +729,6 @@
"P1": "目前网站主题支持如下",
"P11": "Fluent UI (已集成)",
"P12": "主题样式通过静态 Web 资源提供,请在",
- "P13": "静态 Web 资源",
"P14": "内、基础样式之后增加对应的主题样式文件即可",
"P15": "启用",
"P16": "内置主题通过",
@@ -5162,6 +5161,10 @@
"TablesFilterTemplateDescription": "FilterTemplate 类型为 RenderFragment 其值为自定义组件,组件必须继承 FilterBase 本例中最后一列 数量列 通过筛选模板使用自定义组件 CustomerFilter [传送门] CustomerFilter 组件源码
注意事项:
FilterProvider 包裹,FilterProvider必须在 FilterTemplate 节点下FilterProvider 组件的参数可微调过滤器;例如通过设置 ShowMoreButton 控制是否显示 + - 符号v9.6.2 版本前,使用 OnFilterValueChanged 触发过滤回调,重构后使用 OnFilterAsync 触发过滤回调方法Fixed 属性",
+ "TablesDynamicFixedColumnTitle": "动态固定列",
+ "TablesDynamicFixedColumnUnfixButtonText": "取消固定前两列",
"TablesFixedColHeaderDescription": "本例中设置 Name Education Count Complete 前两列和最后一列为固定列,中间各列进行水平滚动,本例中设置 AllowResize=\"true\" 固定列也可以调整宽度",
"TablesFixedColHeaderIntro": "设置 Fixed 属性固定表头",
"TablesFixedColHeaderTitle": "固定列头与列尾",
diff --git a/src/BootstrapBlazor/Components/Table/Table.razor.cs b/src/BootstrapBlazor/Components/Table/Table.razor.cs
index b8203b0bc4d..3428c849b2d 100644
--- a/src/BootstrapBlazor/Components/Table/Table.razor.cs
+++ b/src/BootstrapBlazor/Components/Table/Table.razor.cs
@@ -1421,6 +1421,8 @@ private async Task LoadTableColumnStates()
private void ResetTableColumns()
{
_visibleColumnsCache.Clear();
+ FirstFixedColumnCache.Clear();
+ LastFixedColumnCache.Clear();
if (_tableColumnStates.Count == 0)
{
diff --git a/test/UnitTest/Components/TableTest.cs b/test/UnitTest/Components/TableTest.cs
index 1a31e559151..eab2b845c30 100644
--- a/test/UnitTest/Components/TableTest.cs
+++ b/test/UnitTest/Components/TableTest.cs
@@ -1953,6 +1953,61 @@ public void ColumnFixed_TailColumn_Ok()
cut.DoesNotContain("style=\"left: 300px;\"");
}
+ [Fact]
+ public void ColumnFixed_DynamicBoundaryClass_Ok()
+ {
+ var localizer = Context.Services.GetRequiredService