If a TextField is set to fullWidth and used as a Select, the MenuItems should be as wide as the input (and Menu).
The Menu is the same width as the TextField, but the MenuItems are not the correct size.

<TextField fullWidth select label="Days and Stuff">
<MenuItem value={0}>Today</MenuItem>
<MenuItem value={1}>24 Hours</MenuItem>
<MenuItem value={7}>7 Days</MenuItem>
<MenuItem value={15'}>15 Days</MenuItem>
<MenuItem value={30}>30 Days</MenuItem>
</TextField>
This just looks wonky - its not critical but people think our app is broken. In the meantime, I've used the native prop to skirt around the issue.
| Tech | Version |
|--------------|---------|
| Material-UI | beta 33 |
| React | 15.x |
| browser | Chrome / FF |
| etc | |
This can be used as a workaround:
<TextField fullWidth select SelectProps={{ MenuProps: { MenuListProps: { style: { width: '100%' } } } }}>
Another alternative is to use an override on the List component, i.e:
MuiList: {
root: {
width: '100%',
},
},
Not sure if this was fixed already but could not reproduce with chrome / FF
https://codesandbox.io/s/nwy21nll
@oliviertassinari This seems to be fixed: https://codesandbox.io/s/zq7qj3p86x
@joshwooding do you happen to know which version included the fix?
@joshwooding Thank you for looking into it :).
@cvburgess You can try to change the version in the linked codesandbox. I have tried up to v1.0.0, it's working. If you want to stay on the beta, you can dive even further.
v1.0.0-beta.33 is 10 month old, wow, that's all?!
Actually, it's also working with beta.33 馃槷: https://codesandbox.io/s/zq8koqyxy4. If you guys have a reproduction witht the latest version of Material-UI, we can have a look. Otherwise, let's keep it close.
@oliviertassinari we're on 1.5.1 :/
@cvburgess Looks like it works for 1.5.1 too :/ https://codesandbox.io/s/oxzmqylj46
This is just a standalone component though, do you have an example of the outer component and its styling?
Most helpful comment
Another alternative is to use an override on the List component, i.e: