Skip to content

Commit 913aecf

Browse files
committed
perf: 改用 Find 提高性能
1 parent ac1d596 commit 913aecf

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/BootstrapBlazor/Components/Select/Select.razor.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Licensed to the .NET Foundation under one or more agreements.
1+
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the Apache 2.0 License
33
// See the LICENSE file in the project root for more information.
44
// Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone
@@ -500,7 +500,7 @@ private async Task OnChange(ChangeEventArgs args)
500500
var item = GetItemWithEnumValue()
501501
?? Rows.Find(i => i.Value == CurrentValueAsString)
502502
?? Rows.Find(i => i.Active)
503-
?? Rows.FirstOrDefault(i => !i.IsDisabled);
503+
?? Rows.Find(i => !i.IsDisabled);
504504
return item;
505505
}
506506
}

0 commit comments

Comments
 (0)