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

[TreeSelect ] 希望组件支持禁用某个节点的时候,不要禁用它所属的子节点 #4761

Closed
jieyuming opened this issue Nov 20, 2024 · 2 comments
Labels
usage the issue about component usage

Comments

@jieyuming
Copy link

这个功能解决了什么问题

目前的需求,用TreeSelect 组件展示部门的组织架构,部门下同时有子部门和人员,希望子部门不能被选中(需要禁用),但子部门下的用户可以被选中

你建议的方案是什么

希望可以支持,我给父的节点设置disabled: true,然后再给子节点设置disabled: false,实现子节点可选
{
label: '江苏省',
value: 'jiangsu',
disabled: true,
children: [
{
label: '南京市',
value: 'nanjing',
disabled: false,
},
{
label: '苏州市',
value: 'suzhou',
disabled: false,
},
],
},

Copy link
Contributor

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

@uyarn
Copy link
Collaborator

uyarn commented Nov 20, 2024

@uyarn uyarn closed this as completed Nov 20, 2024
@uyarn uyarn added the usage the issue about component usage label Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
usage the issue about component usage
Projects
None yet
Development

No branches or pull requests

2 participants