Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tree didn't update node data 树组件会缓存具有相同key的节点的属性 #26926

Open
1 task
HeWei-imagineer opened this issue Sep 28, 2020 · 1 comment
Labels

Comments

@HeWei-imagineer
Copy link

HeWei-imagineer commented Sep 28, 2020

  • I have searched the issues of this repository and believe that this is not a duplicate.

Reproduction link

Edit on CodeSandbox

Steps to reproduce

Open the CodeSandbox link, expand parent1, then expand leaf 1-0. Finally change the tab to b, expand parent1. Now leaf 1-0's triangle icon disappeared, it should render.
Set two different treeData to a tree. There are some nodes that the key are same in this treeData. To load data asynchronously when click to expand a treeNode. Then change the treeData, the triangle icon of the treeNode has the same key as the last load data treeNode disappeared.

What is expected?

the triangle icon render

What is actually happening?

the triangle icon disappeared

Environment Info
antd undefined
React ^16.8.6
System macOS Mojave 10.14.5
Browser google chrome 85.0.4183.102
@HeWei-imagineer HeWei-imagineer changed the title Tree didn't update node data Tree didn't update node data 树组件会缓存具有相同key的节点的属性 Sep 29, 2020
@romgrk
Copy link

romgrk commented May 4, 2021

This issue is still present.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants