Material-ui: change css width of nested menuItems[] of a Menu?

Created on 17 Mar 2017  Â·  2Comments  Â·  Source: mui-org/material-ui

<Menu desktop={true} autoWidth={false} style={{width: "100px",  overflowX: 'hidden'}}>
    <MenuItem desktop={true} rightIcon={<ArrowDropRight />} primaryText="Option1" menuItems={[
        <MenuItem desktop={true} primaryText="Option1a" onTouchTap={props.ontheclick}/>,
        <MenuItem desktop={true} primaryText="Option1b" onTouchTap={props.ontheclick}/>]}/>
    <MenuItem onTouchTap={props.ontheclick} primaryText="Option 2" />
</Menu>

I have a material ui menu like above. I want to set style like I'm doing in Menu for MenuItems in menuItems={[MenuItem, MenuItem]}. I've tried adding style={{width: "100px", overflowX: 'hidden'}} to <MenuItem desktop={true} primaryText="Option1a"/> but it doesn't change the actual width of the nested menu. Right now, my main menu is way thinner than my nested menu.

How do I manipulate the css style of MenuItems part of the menuItems array for nested?

question

Most helpful comment

I did ask on there but no response. Can you give me a hand?

http://stackoverflow.com/questions/42851127/material-ui-nested-menu-change-css-width-of-menuitems-of-a-menuitem

On Fri, Mar 17, 2017 at 5:04 AM, Matt Brookes notifications@github.com
wrote:

Question? https://github.com/callemall/material-ui#note This helps us
keep issues for... issues. 😄 Thanks!

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/callemall/material-ui/issues/6360#issuecomment-287337241,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AVeICpKkTglXNruBIIJKXfDONavBSkX_ks5rmnbPgaJpZM4MgPyi
.

All 2 comments

Question? This helps us keep issues for... issues. :smile: Thanks!

I did ask on there but no response. Can you give me a hand?

http://stackoverflow.com/questions/42851127/material-ui-nested-menu-change-css-width-of-menuitems-of-a-menuitem

On Fri, Mar 17, 2017 at 5:04 AM, Matt Brookes notifications@github.com
wrote:

Question? https://github.com/callemall/material-ui#note This helps us
keep issues for... issues. 😄 Thanks!

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/callemall/material-ui/issues/6360#issuecomment-287337241,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AVeICpKkTglXNruBIIJKXfDONavBSkX_ks5rmnbPgaJpZM4MgPyi
.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ghost picture ghost  Â·  3Comments

ryanflorence picture ryanflorence  Â·  3Comments

activatedgeek picture activatedgeek  Â·  3Comments

sys13 picture sys13  Â·  3Comments

rbozan picture rbozan  Â·  3Comments