ant-design-vue icon indicating copy to clipboard operation
ant-design-vue copied to clipboard

When one of the nodes of the `a-tree` component uses `disableCheckbox` as `true`, the semi-selected state of its associated parent node disappears

Open evanlong-me opened this issue 3 years ago • 1 comments
trafficstars

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

Version

3.2.9

Environment

windows10、Google Chrome 103.0.5060.66、Vue3.2.37

Reproduction link

https://stackblitz.com/edit/vue-hv9bw1?file=src%2FApp.vue,src%2Fcomponents%2FHelloWorld.vue

Steps to reproduce

  1. 移除Dome中的 treeData[0].disableCheckbox 属性 --- 能看到正常显示
  2. 对移除的 disableCheckbox 属性进行撤回 --- 会发现所关联的半选状态消失

What is expected?

所关联的父节点的半选状态应该保留。 原因:

  1. disableCheckbox 时没有半选状态,用户将不会再有欲望往下展开或者往下寻找
  2. 这是给用户的唯一的提示证明

What is actually happening?

a-tree 组件其中一个节点使用 disableCheckboxtrue 时,它所关联的父节点的半选状态消失不见


disableCheckbox 所做的事情只应该是禁用 Checkbox,而不是做本质的事情以外影响其他的交互

evanlong-me avatar Jul 04 '22 08:07 evanlong-me

设置 checkStrictly 后,是否选中或半选,都是自己控制的

tangjinzhou avatar Jul 05 '22 15:07 tangjinzhou

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days

github-actions[bot] avatar Sep 04 '22 03:09 github-actions[bot]

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

github-actions[bot] avatar Sep 13 '23 00:09 github-actions[bot]