Zach Smith
Zach Smith

Reputation: 8971

Hows to do nested navigation with react-md?

Looking at the react-md component library, there are clear examples on how to draw a list of navigation items, including with dividers.

However I CAN'T find an example of how to use nested lists such as in the image pasted here. Using the <NavigationDrawer> components, what format should the navItems property be to get a nested list?

The documentation shows that this property should be an array of items that are either react elements or objects.

arrayOf(oneOfType([
  element,
    shape({
    divider: bool,
    subheader: bool,
    primaryText: node
  })
]))

Or... what other combinations of components could work?

Nested navigation example

Upvotes: 0

Views: 185

Answers (1)

Zach Smith
Zach Smith

Reputation: 8971

The <ListItem> component has a property nestedItems, which results in an expansion list. So it's nothing to do with the <NavigationDrawer> component.

Upvotes: 0

Related Questions