Removing underline style of autocomplete in react material ui component
Just adding another answer for material v1. In v1 we have to target the input inside the text field. in order to remove or style the underline
<TextField
defaultValue="hello"
InputProps={{
disableUnderline: true
}}
/>
Minor update to @Liem's response. Just putting the InputProps
directly overwrites the InputProps
it would use by default, which breaks the component. By merging the disableUnderline
with the other InputProps
, it should work.
<Autocomplete
renderInput={
params =>
<TextField
{...params}
InputProps={{...params.InputProps, disableUnderline: true}}
/>
}
/>