简体   繁体   中英

How to change the border Bottom of Material-UI <Autocomplete/> if is disable

I would like to change the appearance of the autocomplete component provided by MaterialUi when it is disabled. They propose, I imagine, borderBottom: dotted. I would like it to look like the select, also disabled, that I show in the following example.

https://codesandbox.io/s/xenodochial-shtern-7icn9?file=/src/playground.js

I don't know how is the correct way to overwrite the property proposed by MaterialUi. Any ideas will be welcome.

Add in your main css (for overwrite a rule it must be imported after mui):

.MuiInput-underline.Mui-disabled:before {
  border-bottom: 0;
}

在此处输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM