Is there an existing issue for this?
Describe the bug
设置IsAsync=true,即使IsKeepDisable=true,OnComfim结束后按钮也变成可用状态
PopConfirmButton.razor.cs中
private async Task OnClickConfirm()
{
if (IsAsync)
{
IsDisabled = true;
IsAsyncLoading = true;
StateHasChanged();
if (OnConfirm != null)
{
await OnConfirm();
}
if (ButtonType == ButtonType.Submit)
{
await TrySubmit();
}
else
{
IsDisabled = false;//这里,没有用IsKeepDisable,直接恢复成可用了
IsAsyncLoading = false;
StateHasChanged();
}
....
Expected Behavior
异步动画结束后,能够设置按钮是否禁用。
Interactive render mode
Interactive Server (Interactive server-side rendering (interactive SSR) using Blazor Server)
Steps To Reproduce
1、添加一个
<PopConfirmButton IsAsync="true" IsKeepDisabled="true" Size="Size.Large" @ref="ButtonFinish" Color="Color.Success" OnConfirm="ButtonFinish_OnClick" Content="确定进行完成操作么?" ConfirmButtonColor="Color.Success" Placement="Placement.Top">完成
ButtonFinish_OnClick()
{
Task.Delay(1000);
}
2、点击按钮
3、异步动画结束后,按钮直接变为可用了,而不是跟IsKeepDisabled一致
Exceptions (if any)
No response
.NET Version
NET9.0
Anything else?
No response
Is there an existing issue for this?
Describe the bug
设置IsAsync=true,即使IsKeepDisable=true,OnComfim结束后按钮也变成可用状态
PopConfirmButton.razor.cs中
private async Task OnClickConfirm()
{
if (IsAsync)
{
IsDisabled = true;
IsAsyncLoading = true;
StateHasChanged();
....
Expected Behavior
异步动画结束后,能够设置按钮是否禁用。
Interactive render mode
Interactive Server (Interactive server-side rendering (interactive SSR) using Blazor Server)
Steps To Reproduce
1、添加一个
<PopConfirmButton IsAsync="true" IsKeepDisabled="true" Size="Size.Large" @ref="ButtonFinish" Color="Color.Success" OnConfirm="ButtonFinish_OnClick" Content="确定进行完成操作么?" ConfirmButtonColor="Color.Success" Placement="Placement.Top">完成
ButtonFinish_OnClick()
{
Task.Delay(1000);
}
2、点击按钮
3、异步动画结束后,按钮直接变为可用了,而不是跟IsKeepDisabled一致
Exceptions (if any)
No response
.NET Version
NET9.0
Anything else?
No response