You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -56,7 +57,7 @@ What `TreeContainer` will do for you is:
56
57
57
58
*`TreeContainer`: the easiest entry point for normal use. Wrap this around your component, pass a data source of interface `TreeSource`, and you're usually good to go.
58
59
*`useTreeLoader()`: take a source and the current tree state and load data from the source to expand the tree, returning a simple an up-to-date data structure with tree data.
59
-
*`useTreeController()` / `useTreeNodeController(id: string)`: return an object that allows you to control the state of the current tree (from context).
60
+
*`useTreeController()` / `useTreeNodeController(id: string)` / `useTreeNodesController(ids: string[])`: return an object that allows you to control the state of the current tree (from context).
60
61
*`useTreeContent()`: return the data for the current tree (from context).
61
62
62
63
We will now describe these in more detail.
@@ -113,6 +114,11 @@ Same as `useTreeController()`, but only for one tree node. You should, for insta
113
114
*`toggleExpanded(): void`.
114
115
*`setActive(active?: boolean): void`.
115
116
117
+
### useTreeNodesController(ids: string[])
118
+
Same as `useTreeNodeController()`, but for multiple tree nodes. Not all methods make sense, so it only provides:
119
+
120
+
*`setMultipleExpanded(expanded?: boolean): void`.
121
+
116
122
### useTreeContent()
117
123
When used inside the context of a tree, returns the current data of the tree. This can be used if you have several components nested inside your `<TreeContainer>` that all want to display the tree (or parts thereof).
0 commit comments