Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow user to set Menu Item Toggle defaultToggled value #291

Closed
yhbrandon opened this issue Jan 30, 2015 · 0 comments · Fixed by #299
Closed

Allow user to set Menu Item Toggle defaultToggled value #291

yhbrandon opened this issue Jan 30, 2015 · 0 comments · Fixed by #299
Labels
component: menu This is the name of the generic UI component, not the React module! component: switch This is the name of the generic UI component, not the React module!

Comments

@yhbrandon
Copy link

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.

mmrtnz added a commit to mmrtnz/material-ui that referenced this issue Jan 30, 2015
hai-cea pushed a commit that referenced this issue Feb 3, 2015
Toggle props can be passed into menu items. Fixes #291
@oliviertassinari oliviertassinari added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Dec 25, 2022
@zannager zannager added component: menu This is the name of the generic UI component, not the React module! component: switch This is the name of the generic UI component, not the React module! and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Jan 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: menu This is the name of the generic UI component, not the React module! component: switch This is the name of the generic UI component, not the React module!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants