Skip to content

Commit 81ca44c

Browse files
authored
fix(CountButton): add Task yield prevent block thread (#7306)
1 parent 8dd3e1d commit 81ca44c

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/BootstrapBlazor/Components/Button/CountButton.cs

Lines changed: 2 additions & 1 deletion
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
@@ -36,6 +36,7 @@ protected override async Task OnClickButton()
3636
IsAsyncLoading = true;
3737
IsDisabled = true;
3838

39+
await Task.Yield();
3940
await HandlerClick();
4041
await UpdateCount();
4142

0 commit comments

Comments
 (0)