Skip to content

Commit 29c11d2

Browse files
committed
refactor: 简化代码
1 parent 0fd59c6 commit 29c11d2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/BootstrapBlazor/Components/AutoComplete/AutoComplete.razor.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public partial class AutoComplete
8585
[NotNull]
8686
private RenderTemplate? _dropdown = null;
8787

88-
private string _clientValue = "";
88+
private string? _clientValue;
8989

9090
private string? ClassString => CssBuilder.Default("auto-complete")
9191
.AddClass("is-clearable", IsClearable)
@@ -133,7 +133,7 @@ protected override void OnParametersSet()
133133
Icon ??= IconTheme.GetIconByKey(ComponentIcons.AutoCompleteIcon);
134134
LoadingIcon ??= IconTheme.GetIconByKey(ComponentIcons.LoadingIcon);
135135

136-
_clientValue = Value ?? "";
136+
_clientValue = Value;
137137
}
138138

139139
/// <summary>

0 commit comments

Comments
 (0)