Skip to content

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

@evanlong-me

Description

@evanlong-me
  • 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,而不是做本质的事情以外影响其他的交互

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions