[TreeView] Expand control at TreeItem level #9960
Labels
component: tree view
TreeView, TreeItem. This is the name of the generic UI component, not the React module!
discussion
dx
Related to developers' experience
new feature
New feature or request
Summary 💡
Currently there is no way to:
TreeItem
by default without knowing theTreeItem
's ids in advance.TreeItem
from it's own props.Both of these features can be solved by adding
defaultExpanded
andexpanded
props toTreeItem
itself, that would override whatever dictated by the rootTreeView
.If this is not technically possible, it would be geat to at least have a
defaultExpandAll={true}
prop toTreeView
.Examples 🌈
Motivation 🔦
I am trying to display a dynamic tree, where nodes can be added and removed.
Because of the dynamic nature, I cannot use
defaultExpanded
, since this props is only read at the first mount, and never re-read (even if I manage to add subsequent ids to the array).Neither can I use
expanded
(which does work dynamically), since it forces the tree to be "controlled", which I do not want.The text was updated successfully, but these errors were encountered: