material-ui
material-ui copied to clipboard
Allow user to set Menu Item Toggle defaultToggled value
Currently there is no option to set defaultToggled for a toggle on menuItem. Allowing a toggled (isToggled) prop from the menu into the menu item would provide a higher level of control.
A way to achieve this would be to allow the menuItems array objects to have a isToggled key value bool.
On the menu component you could pass into the Menu Item component the menuItem.isToggle key into its props, which would then pass that prop into the Toggle component's defaultToggled prop.