Skip to content

Commit 17b2560

Browse files
braia123ArgoZhang
andauthored
refactor(AutoFill): sync client value after server rerender (#6975)
* Update AutoFill.razor.cs 当初始化或选择选项后更新_clientValue * chore: bump version 9.11.5-beta02 * refactor: 更新代码 --------- Co-authored-by: braia123 <[email protected]> Co-authored-by: Argo Zhang <[email protected]>
1 parent bfcb69c commit 17b2560

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/BootstrapBlazor/BootstrapBlazor.csproj

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

33
<PropertyGroup Condition="'$(VisualStudioVersion)' == '17.0'">
4-
<Version>9.11.5-beta01</Version>
4+
<Version>9.11.5-beta02</Version>
55
</PropertyGroup>
66

77
<PropertyGroup Condition="'$(VisualStudioVersion)' == '18.0'">
8-
<Version>10.0.0-rc.2.1.0</Version>
8+
<Version>10.0.0-rc.2.1.1</Version>
99
</PropertyGroup>
1010

1111
<ItemGroup>

src/BootstrapBlazor/Components/AutoFill/AutoFill.razor.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@ protected override void OnParametersSet()
176176
LoadingIcon ??= IconTheme.GetIconByKey(ComponentIcons.LoadingIcon);
177177

178178
_displayText = GetDisplayText(Value);
179+
_clientValue = _displayText;
179180
Items ??= [];
180181
}
181182

@@ -185,7 +186,7 @@ protected override void OnParametersSet()
185186
/// <returns></returns>
186187
protected override Task InvokeInitAsync() => InvokeVoidAsync("init", Id, Interop, _displayText, nameof(TriggerChange));
187188

188-
private string _clientValue = "";
189+
private string? _clientValue;
189190

190191
/// <summary>
191192
/// 由客户端 JavaScript 触发

0 commit comments

Comments
 (0)