Material-ui: [SelectField] autoWidth ignored

Created on 26 Aug 2016  路  1Comment  路  Source: mui-org/material-ui

autoWidth doesn't seem to work. At least not on chrome.

Even in the example here:

http://www.material-ui.com/v0.15.4/#/components/select-field

the width: auto doesn't get set when autoWidth=true but even if I set it in the inspector and the SelectField shrinks to content, the label overflows because it doesn't have white-space: nowrap set.

Select

Most helpful comment

I am running into the same issue. It is preventing me from using the SelectField in a tight layout. Please provide a solution.

Edit
It seems that autoWidth controls the width of the dropdown, not the SelectField itself. I found the behavior I was looking for in DropDownMenu. Which begs the question: what is the difference between SelectField and DropDownMenu? They both point to the same page in the Material Design spec and they seem to be offering pretty much the same functionality.

>All comments

I am running into the same issue. It is preventing me from using the SelectField in a tight layout. Please provide a solution.

Edit
It seems that autoWidth controls the width of the dropdown, not the SelectField itself. I found the behavior I was looking for in DropDownMenu. Which begs the question: what is the difference between SelectField and DropDownMenu? They both point to the same page in the Material Design spec and they seem to be offering pretty much the same functionality.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

chris-hinds picture chris-hinds  路  3Comments

sys13 picture sys13  路  3Comments

reflog picture reflog  路  3Comments

FranBran picture FranBran  路  3Comments

iamzhouyi picture iamzhouyi  路  3Comments