-
Notifications
You must be signed in to change notification settings - Fork 333
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] 有重复节点时,表现异常 #1695
Comments
👋 @moecasts,感谢给 TDesign 提出了 issue。 |
|
目前tree内部维护唯一不同的key用的也是value字段,与外部业务理解的value不一样,需要通过keys 更改为别的字段并且提供一个不重复的key给到tree |
moecasts
added a commit
to moecasts/tdesign-react
that referenced
this issue
Nov 10, 2022
honkinglin
pushed a commit
that referenced
this issue
Nov 10, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
tdesign-react 版本
0.42.6
重现链接
https://codesandbox.io/s/tdesign-react-demo-forked-vlnufb?file=/src/demo.jsx
重现步骤
当 tree 中有重复的节点时,表现奇怪。
eg:
期望结果
重复的节点也能显示,且切换选中状态正常。
实际结果
No response
框架版本
No response
浏览器版本
No response
系统版本
No response
Node版本
No response
补充说明
业务场景:
人员选择器,一个人可以属于不同的组。
解决思路:
以 path 作为节点的 key,而不是 value。
The text was updated successfully, but these errors were encountered: