0

I want to change the background color of select from material ui when it is selected. The link is the image showing when it is not selected, and when it is selected. Select

As you can see, when it is selected, there is huge gray backgound color showing up. I want to change it to transparent but it is not working somehow.

Below is code that I'm using right now.

const useStyles = makeStyles(theme => ({
select: {
        height: theme.spacing(5)
    },
}));

const classes = useStyles();

<FormControl margin='none' variant="outlined">
                                        <Select
                                        native
                                        className={classes.select}
                                        value={filter}
                                        onChange={handleChange()}
                                        name="filter"
                                        inputProps={{ 'aria-label': 'filter' }}
                                        >
                                        <option value="All">All</option>
                                        </Select>
                                    </FormControl>

1 Answer 1

0

you can use border or outline css properties to make this instead of background color.

here's some example and guiding from: w3schools:

Border Outline

hope this can fix your problem

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.