Skip to content

Bug:PopConfirmButton 在 Table 行内异步更新后 IsDisabled 不刷新 UI #10

Description

@tzj999

版本
BootstrapBlazor 10.5.1
环境
Blazor Server
Table 组件行内使用 PopConfirmButton
问题描述
Table 行按钮绑定 IsDisabled="@(context.IsEnabled == xxx)"
点击按钮执行异步方法修改 context.IsEnabled
调用 StateHasChanged() / Table的QueryAsync()
按钮的 IsDisabled 状态已改变,但 DOM 没有更新,html行为未加上 disabled class,按钮仍然可点
问题表现
后台模型状态已更新
组件未重新渲染
disabled 属性没有同步到 HTML button
导致按钮可被重复点击
预期行为
异步修改模型后,IsDisabled 应该同步刷新到 HTML DOM,按钮变灰、不可点击。
临时解决方案
使用 OnBeforeClick 可以正常工作,但 IsDisabled 存在渲染 BUG。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions