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-select] 透传treeProps的keys属性后,选中项展示异常 #622

Closed
Zwow opened this issue Mar 23, 2022 · 4 comments
Closed

[tree-select] 透传treeProps的keys属性后,选中项展示异常 #622

Zwow opened this issue Mar 23, 2022 · 4 comments
Labels
🐞 bug Something isn't working

Comments

@Zwow
Copy link
Contributor

Zwow commented Mar 23, 2022

tdesign-vue 版本

0.38.0-alpha.2

重现链接

https://codesandbox.io/s/tree-selectyi-xuan-xiang-xian-shi-yi-chang-kc4bes?file=/src/demo.vue

重现步骤

点击选择框,点击'一'选项前的箭头加载子选项,选择子选项‘一.11’

期望结果

点击选择框,点击'一'选项前的箭头加载子选项,选择子选项‘一.11’,已选项应显示label值而不是value

实际结果

点击选择框,点击'一'选项前的箭头加载子选项,选择子选项‘一.11’,已选项展示的是value值

框架版本

No response

浏览器版本

No response

系统版本

No response

Node版本

No response

补充说明

No response

@github-actions
Copy link
Contributor

👋 @Zwow,感谢给 TDesign 提出了 issue。
请根据 issue 模版确保背景信息的完善,我们将调查并尽快回复你。

@Godlike-meteor
Copy link
Contributor

这里看起来是 codesandbox 的问题,在实际项目中试了一下没问题 @Zwow

@Zwow
Copy link
Contributor Author

Zwow commented Mar 25, 2022

@Godlike-meteor 已定位问题不是codesandbox导致,是由于同时通过treeProps透传了keys和load,但是getTreeData方法返回nodes时没使用keys里的属性别名来命名node对象中的label、value,导致getTreeNode返回null

@xiaosansiji
Copy link
Collaborator

已在 0.39.1 版本中修复

@uyarn uyarn reopened this May 16, 2023
@uyarn uyarn added the 🐞 bug Something isn't working label May 16, 2023
@uyarn uyarn closed this as completed Sep 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants