Skip to content

Commit f8c51e1

Browse files
committed
refactor: 重构代码消除警告信息
1 parent f5eebaa commit f8c51e1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/BootstrapBlazor/Components/Dropdown/Dropdown.razor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ protected override void OnParametersSet()
229229
Items = typeof(TValue).ToSelectList();
230230
}
231231

232-
DataSource = Items.ToList();
232+
DataSource = [.. Items];
233233

234234
SelectedItem = DataSource.Find(i => i.Value.Equals(CurrentValueAsString, StringComparison.OrdinalIgnoreCase))
235235
?? DataSource.Find(i => i.Active)

0 commit comments

Comments
 (0)