Sunday, May 12, 2024
 Popular · Latest · Hot · Upcoming
8
rated 0 times [  11] [ 3]  / answers: 1 / hits: 15090  / 7 Years ago, tue, may 2, 2017, 12:00:00

I want to remove the underline style and change the of the color of it when the text field gets focus in the autocomplete component of react material ui.



I can't seem to find the style to override.



Thanks in advance.


More From » css

 Answers
51

You can accomplish this using the <TextField/> props that are rendered to the <AutoComplete/> component. Because <AutoComplete /> uses the <TextField/> you have access to those props. So you actually have two ways of removing the underline of the autocomplete. Unfortunately this is undocumented in the Material-UI docs for autocomplete.



<AutoComplete underlineStyle={{display: 'none'}}>



or



<AutoComplete underlineShow={false}>



edit: This answer is relevant to older versions of Material UI. This answer does not work for version 1.0 or higher.


[#57930] Sunday, April 30, 2017, 7 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
byrondonavanc

Total Points: 675
Total Questions: 107
Total Answers: 105

Location: Peru
Member since Fri, Oct 14, 2022
2 Years ago
byrondonavanc questions
;