Sencha extjs panel tree node s, autodetect leaf node

All the Ext examples I've seen so far regarding populating and displaying hierarchical data in a tree pane show that you must have a property named leaf in order to determine if a node is a leaf. Is there something that will look at the number of children and determine if the current node is a leaf, so I don’t have to go through my data tree and do it myself?

+4
source share
2 answers

You must say "leaf: true" to distinguish between leaf and folder without children. When considering drag and drop, you can put things in folders, but not in sheets, so this distinction is important.

+1
source

As mentioned in BigSean, you need to write your own logic to dynamically determine a boolean value, e.g.

checking the length of nodes, etc.,

0
source

All Articles