Skip to content

Commit 3739e9b

Browse files
authored
fix(Table): search model initialize twice (#4379)
* fix: 修复顶栏搜索自定义模型初始化问题 * chore: bump version 8.10.2-beta01
1 parent edb667c commit 3739e9b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/BootstrapBlazor/BootstrapBlazor.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk.Razor">
22

33
<PropertyGroup>
4-
<Version>8.10.1</Version>
4+
<Version>8.10.2-beta01</Version>
55
</PropertyGroup>
66

77
<ItemGroup Condition="'$(TargetFramework)' == 'net6.0'">

src/BootstrapBlazor/Components/Table/Table.razor.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -737,8 +737,6 @@ protected override void OnInitialized()
737737

738738
// 初始化节点缓存
739739
TreeNodeCache ??= new(Equals);
740-
SearchModel = CreateTItem();
741-
742740
OnInitLocalization();
743741

744742
// 设置 OnSort 回调方法
@@ -860,6 +858,8 @@ private void OnInitParameters()
860858
TreeExpandIcon ??= IconTheme.GetIconByKey(ComponentIcons.TableTreeExpandIcon);
861859
TreeNodeLoadingIcon ??= IconTheme.GetIconByKey(ComponentIcons.TableTreeNodeLoadingIcon);
862860
AdvancedSortButtonIcon ??= IconTheme.GetIconByKey(ComponentIcons.TableAdvancedSortButtonIcon);
861+
862+
SearchModel ??= CreateTItem();
863863
}
864864

865865
/// <summary>

0 commit comments

Comments
 (0)