How does the ANTD tree selection control TreeSelect prohibit the selection of parents?

how to prevent the selection of parents from the TreeSelect tree selection control in Ant Financial Services Group ANTD? For example:

{
name:"",
key:"first",
children:[{
  name:""
  key:"second",
  children:[{
    name:"",
    key:"third"
    }]
  }]
}

this three-tier data structure is selected by TreeSelect and becomes a tree-like checkable component. The purpose of
is: just want to allow users to choose the third layer of data, that is, the "Wang Xiaoming" layer, and want to prohibit the selection of schools and classes, what should I do? Component default is the first layer, the second layer can also be selected, how to prohibit? The purpose is similar to the following figure:

clipboard.png

how to make the parent at the red cross unselectable?

Mar.11,2021

recursively traverse the spanning tree node disableCheckbox= {true}


how to traverse the tree node


is there a specific plan?


treeData parent add disabled
clipboard.png

Menu