I am using the virtualized-select React component. I would like to style the text and background color of the option while it is in the dropdown. For the simple code I have below, the search bar background is red, and the search bar background turns blue when I select option 1, but I would like the background in the option dropdown to be blue. Additionally, the color attribute does not seem to be working at all; are only certain CSS attributes changeable?
render () {
const styles = {
color: "red",
background: "red"
};
const options = [
{ label: "One", value: 1 , style: {background: 'blue'}},
{ label: "Two", value: 2 },
{ label: "Three", value: 3}
//{ label: "Three", value: 3, disabled: true }
// And so on...
]
return (
<VirtualizedSelect
options={options}
onChange={(selectValue) => this.setState({ selectValue })}
value={this.state.selectValue}
placeholder="Search"
style={styles}
/>
)
}
}