TreeMenuItemcomponent

TreeMenuItem({ path = "/", name, title, children }: TreeElementProps & TreeMenuExtras): ReactNode
ParamType
propsTreeElementProps & 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 name to the parent's path.
  • 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="/" />