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

DropDownMenu autoWidth not working #5812

Closed
yanickrochon opened this issue Dec 22, 2016 · 5 comments
Closed

DropDownMenu autoWidth not working #5812

yanickrochon opened this issue Dec 22, 2016 · 5 comments
Labels
bug 🐛 Something doesn't work

Comments

@yanickrochon
Copy link

Description

I am using a DropDownMenu to select a unit of measure in an app I'm working on, and since the app is localized, I'm attempting to make the UI as dynamic as possible to accommodate various locales' word length, etc.

However, using autoWidth on the DropDownMenu component results in this UI

selection_116

Link to minimally-working code that reproduces the issue

http://www.webpackbin.com/4JSrK1HNz

Versions

  • Material-UI: 0.16.5
  • React: 15.4.1
  • Browser: Google Chrome 55.0.2883.87
@mbrookes mbrookes added the bug 🐛 Something doesn't work label Jan 17, 2017
@jrschifa
Copy link

To add to this, It would appear that autoWidth is not passed down to the Menu component. I'm not sure if this is intentional or just an oversight.

@mbrookes
Copy link
Member

mbrookes commented Jan 18, 2017

It's being consumed here: https://github.com/callemall/material-ui/blob/master/src/DropDownMenu/DropDownMenu.js#L339

I'm note sure that the use of secondaryText in DropDownMenu's MenuItems was anticipated...

@yanickrochon
Copy link
Author

Well, it was not specified anyway. 😉

@jrschifa
Copy link

Yes, but since autoWidth isn't passed down, setWidth() always runs potentially resulting in a different width than the one passed in menuStyle

@danielwaltz
Copy link

Running into this issue myself. Any updates?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work
Projects
None yet
Development

No branches or pull requests

5 participants