TreeMenuItemcomponent
TreeMenuItem({ path = "/", name, title, children }: TreeElementProps & TreeMenuExtras): ReactNode| Param | Type | |
|---|---|---|
props | TreeElementProps & TreeMenuExtras | The tree element props plus the parent's path. required |
| Return | |
|---|---|
ReactNode | A <MenuItem> for the element, with a nested <Menu> when it has menu-eligible children. |
Default menu item renderer for any tree-* element.
- Computes its own URL path by appending its
nameto the parent'spath. - Passes both the label and the nested
<TreeMenuMapper>to<MenuItem>;<MenuItem>itself decides whether to reveal the nested submenu based on the current URL.
Examples
<TreeMenuItem {...element.props} path="/" />