I am working on a project and leverage React Material UI and need to override the Select component's border bottom color on the focused state. Here is what I'm using right now
import { Select as MuiSelect, withStyles } from '@material-ui/core';
import { BRAND_COLORS } from '../../constants/colors';
const FONT_SIZE = 20;
const Select = withStyles({
root: {
fontSize: FONT_SIZE,
'&:focus': {
backgroundColor: 'transparent',
},
'& .MuiInput-underline:after': {
borderBottomColor: BRAND_COLORS.blue,
},
},
})(MuiSelect);
export default Select;
<Select
native
startAdornment={<InputAdornment position="start"><FilterListIcon /></InputAdornment>}
value={service.regionalFocus}
onChange={(event) => this.props.changeSelectedRegionalFocus({
providerId, serviceId: service.service_id, regionalFocus:
event.target.value})
}
>
{regionalFocus.map((region, index) => service.service_regions[region.value].length ? (
<option key={index} value={region.value}>
{region.label}
</option>
) : null)}
</Select>
I'm able to override the font size, however, the borderBottomColor is not registering. Any thoughts?