Skip to content

Table 树形数据更新 Items 后未能刷新显示 #3168

Answered by ArgoZhang
pankey888 asked this question in Q&A
Discussion options

You must be logged in to vote

@pankey888 Table 组件功能比较多,为了性能 IsTree="true" 的时候内部使用了缓存技术,你这样更改是无法更改 UI 显示的,需要增加一个参数 key

<Table @key="TreeItems" TItem="TreeFoo" IsBordered="true" ShowToolbar="true" IsStriped="true" TreeIcon="fa-solid fa-circle-chevron-right" TreeExpandIcon="fa-solid fa-circle-chevron-right fa-rotate-90"
       Items="@TreeItems" IsTree="true" TreeNodeConverter="@TreeNodeConverter" OnTreeExpand="@OnTreeExpand">
    <TableColumns>
        <TableColumn @bind-Field="@context.Name" Width="360" />
        <TableColumn @bind-Field="@context.DateTime" Width="180" />
        <TableColumn @bind-Field="@context.Address" />
        <TableColumn @bind-Field="@context.Count" />
    </TableColumns>
    <TableToolbarTem…

Replies: 4 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by pankey888
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Question that needs to be answered
2 participants
Converted from issue

This discussion was converted from issue #3159 on March 29, 2024 05:13.