fontSize is not applying in AutoComplete.
Sample code -
<AutoComplete
menuStyle = {{fontSize:14}}
listStyle={{fontSize:14}}
..
..
/>
Facing the same issue.
@ashutoshjha1409 me too facing the same issue
Did this work in a previous version?
Hi all, I am facing the same problem, the following works as expected and allows me to set the size of the hint and input text:
hintStyle={{ fontSize: 15 }}
inputStyle={{ fontSize: 15 }}
...however setting the same on the list and menu does not appear to have any effect...
listStyle={{ fontSize: 15 }}
menuStyle={{ fontSize: 15 }}
It would be great to be able to provide consistent sizing to the various parts of the autocomplete component.
I got this rendering as I wanted using the following but would be great if a simpler fontSize property was made available to the menu so we don't have to map and use a MenuItem which feels like overkill for a simple use case such as this:
...
dataSource={results.map((val) => { return {
text: val.description,
value: (
<MenuItem
primaryText={val.description}
style={{ fontSize: 15, width: 300, textOverflow: 'ellipsis', overflow: 'hidden' }}
/>
) }
})}
...
NB The ellipsis property does not seem to work as expected in this example
Same issue. Can't set font size on autocomplete.
IMO, we should never set font-sizes explicitly in MUI. They should be inherited from the theme / body tag. Why we do this confuses me.
Most helpful comment
I got this rendering as I wanted using the following but would be great if a simpler fontSize property was made available to the menu so we don't have to map and use a MenuItem which feels like overkill for a simple use case such as this:
NB The ellipsis property does not seem to work as expected in this example