I'm trying to use the css approach for styling react-select (v3) but with no success. I do get the wrapping container to style, but the inner stuff does does not even show up in dev tools as applied and overridden by the component itself. Nothing. Why is this and what am I doing wrong?
In my component where I use it, I only import the component itself
import CreatableSelect from "react-select/creatable";
<CreatableSelect
value={this.getCurrentValue(this.state.value, this.state.options)}
options={this.state.options}
placeholder={this.props.formComponentData.placeholder}
onChange={e => this.handleChange(e.value)}
onCreateOption={this.handleCreate}
menuIsOpen={true}
className="select-search-container"
classNamePrefix="select-search"
/>
my scss is imported in my main.scss
@import '../components/SelectSearch';
so the background-color applies and position if I use !important, the .select-search__control is a no show even with !important
.select-search-container {
position: sticky;
background-color: deepskyblue;
}
.select-search__control {
height: 2.75rem;
padding: 0 measure(half) !important;
border: 1px solid red !important;
background-color: deepskyblue !important;
border-radius: 0 !important;
}
Any ideas on why?