Is there a way to change the background color of the dropdown options in my Material UI Autocomplete component?
I've checked out some resources, but they only explain how to use the renderOption
prop to modify the option text itself, resulting in a appearance similar to the provided image:
- Change the color of Material UI Autocomplete option
- How render a list of options with renderOption in material UI
https://i.stack.imgur.com/mJFsR.png
However, I want the entire rectangular area containing the dropdown options to be a specific color. This means that the whole rectangle, not just the area around the option text, should have the desired color. It seems like this will require some careful CSS styling, as it doesn't seem to be directly supported as a prop on the Autocomplete component. I'm struggling to figure out the correct syntax/rules to achieve this.
If possible, it would be great if you could also explain how this customization can be applied globally. I've been unsuccessful in applying an override, such as this one, even after extending the default theme. (You can find more information on why extending the theme is necessary here.)