Make leaf node not expandable in tree regardless of children #6743
Labels
Type: Enhancement
Issue contains an enhancement related to a specific component. Additional functionality has been add
Milestone
Current behavior
When using the tree with nodes containing children, if the node has children, the expand caret will always show, regardless of "leaf" property value.
Expected behavior
If the node's "leaf" property is set to "true", then the node should not be expandable even if there are children on the node.
What is the motivation / use case for changing the behavior?
We've got a tree where there are a number of items a user can select by various properties and sub-properties (think a list of cars chosen by make and fuel-type). The users also have the ability to upload a custom list which wouldn't be arrived through the properties we supply (only 3 specific models of Ford). When the users load the new data, it is potentially in the hundreds of thousands of records and so we place it all under one node on the tree named "uploaded items" with a count of the items in that node but with no option to expand it (there is an option to export the data to a list should they need to review it). We expected to be able to set the "leaf" property for this node to "true" as we want this node to function as a leaf node. However the fact that this node has children is overriding the leaf property and displaying the node as expandable.
Please tell us about your environment:
Language: [all]
Node (for AoT issues):
node --version
=The text was updated successfully, but these errors were encountered: