MUI 0.15.0-alpha.2
React 15.0.1
Chrome 49
It is currently not possible to change the width of AutoComplete
. It's hard-coded to 256px wide. Maybe another prop such as innerStyle
could address this?
@ffxsam - set fullWidth and put it in a container of the desired width.
Please use the appropriate forum for questions before opening issues. :+1:
Ok.. I'll admit, that was dumb on my part. :)
NP. You can also use width
in the style
and menuStyle
props.
@ffxsam - 'textFieldStyle' property of Autocomplete solves the problem
@abdulsaboorahmed it doesn't actually, if you set textFieldStyle to say 200 pixels wide, the outer container of the AutoComplete is still 256 pixels wide.
This isn't a huge deal but it was causing me some grief when the user trys to "unfocus" / "blur" the field by clicking right next to it...
Setting the width with the root "style" prop does seem to be working now at least as of v0.16.7
use fullWidth
No, it's not working! I tried all the hacks, there must be a solution and not workaround!
I had the same issue here, using an AutoComplete within a drawer, and I wanted the menu displaying over with a wider width. The problem seems to be in the Popover being restricted to 256px, and 'fullWidth' option didn't help.
I solved the problem using :
popoverProps={{ style: { width: 'auto'} }}
add this:
/>
use style into "renderInput"
Ex: ' renderInput={params =>
Most helpful comment
use style into "renderInput" } '
Ex: ' renderInput={params =>