Material-ui: [AutoComplete] No way to set the underlying TextField Style

Created on 23 Jun 2016  路  6Comments  路  Source: mui-org/material-ui

Problem description

There is currently to way to set the style of the underlying TextField in the AutoComplete component. So no setting the font size and so on.

Suggestions:

  • Add a new textFieldStyle to the AutoComplete props and pass that as the TextField style prop
  • Forward the style prop directly to the TextField - This makes it trivial to convert a TextField to an AutoComplete, but I'm not sure about the side-effects, it's probably not such a good idea...

Versions

  • Material-UI: 0.15.1
  • React: 15.1.0
Autocomplete

Most helpful comment

It would be helpful to also be able to style all the same components as in the TextField (e.g. the underline, hintText, etc.)

All 6 comments

It would be helpful to also be able to style all the same components as in the TextField (e.g. the underline, hintText, etc.)

Yeah if we can set the global style in maybe the getMuiTheme function that would be ideal. It would be nice to set the styling for common components such as TextField at the global level and then customize it accordingly when needed.

I guess the solution to that could always be our own wrapper over TextField but that seems a bit cumbersome.

This seems fixed, perhaps OK to close? https://github.com/callemall/material-ui/commit/4bea5dd7e01ac51fd07e7159f9ad392cec69ef64#diff-f5a0978e337757ac80c1a1dd2072e1e8

Indeed. It seems to be fixed in v0.16.

As far as I can see there is still no way to override all TextField styles from within AutoComplete , what I see missing:

  • floatingLabelFocusStyle
  • floatingLabelShrinkStyle
  • floatingLabelStyle
  • hintStyle
  • inputStyle
  • textareaStyle
  • underlineDisabledStyle
  • underlineFocusStyle
  • underlineStyle

I've created #6231 to fix that...

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ghost picture ghost  路  3Comments

chris-hinds picture chris-hinds  路  3Comments

finaiized picture finaiized  路  3Comments

zabojad picture zabojad  路  3Comments

sys13 picture sys13  路  3Comments