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
Copy file name to clipboardExpand all lines: README.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -71,6 +71,9 @@ Properties:
71
71
**`defaultState?: TreeState`: the state to start with. If you pass this, but not `state`, then `TreeContainer` will manage state internally (uncontrolled).
72
72
*`onStateChange?: (st: TreeState) => void`: called whenever the tree state changes from within (usually through `useTreeController()`). Use this if you want to manage tree state in your own state container (like Redux).
73
73
*`loaderOptions?: TreeLoaderOptions`: options for loading data from the tree source. See [useTreeLoader()](#usetreeloader).
74
+
*`rootElement?: React.FC<{ tree: Tree<T> }>`: if passed, this element will be shown within the tree container. It will receive the tree as a prop.
75
+
*`render?: (props: { tree: Tree<T> }) => ReactNode`: if passed, this function will be called and its output tree is rendered within the tree container.
76
+
74
77
75
78
### interface TreeSource
76
79
Interface for a data source to fetch tree data, usually from a server. A data source should implement these two methods:
0 commit comments