如何更改材料UI版本5版中的选项字体大小自动完成?
我想更改下拉物品的字体尺寸。
我尝试了更改字体大小的不同方式,如下所示,
,但是这些方式对我不起作用,希望它们是由于它们适用于版本4。
这是我的自动完成组件。
<Autocomplete
size="small"
disablePortal
options={getVisaOptions()}
renderInput={(params) => <TextField {...params} label="Select VISA"/>}
/>
I want to change the font size of the drop down items.
I tried different ways of changing font size as follows,
How do I change Material UI Autocomplete font size?
How to change fontsize of options in Material ui autocomplete?
But those ways are not working for me, hope it is due to they are for version 4.
Here is my Autocomplete component.
<Autocomplete
size="small"
disablePortal
options={getVisaOptions()}
renderInput={(params) => <TextField {...params} label="Select VISA"/>}
/>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
它可以使用自定义
renderoption
it worked with customizing
renderOption
关于您的问题,您可以为选项字体大小设置渲染图并设置样式,这是我可以尝试的示例。
About your question, you could set renderOption and set style for the option font size, here is my example you can try.