Top
TreeView - Keyboard navigation
TreeView
The <TreeView /> has first-class support for keyboard navigation - which is enabled by default via the enableKeyboardNavigation prop.
Here's a list of supported keyboard actions:
If you want all nodes after a certain depth to be rendered as collapsed, use the uncontrolled defaultCollapsedDepth prop (or the controlled collapsedDepth). This prop should not be used (has no effect) when collapsed or defaultCollapsed are specified.
When using keyboard navigation to change the current activeNode, the <TreeView /> is smart enough to skip over disabled tree nodes.
Use onActiveNodeChange({ activeNode }), to react to changes in the activeNode.