z-index issue when other components use bootstrap input-group and form-control class
Hi there,
We recently had an issue with the z-index of the dropdown because other components on the page where using these 2 classes:
.input-group.form-control
and this has a z-index of 2 while the Select-menu-outer class has a z-index of 1 which caused the dropdown being shown below the other input fields.
We managed to go around this by overriding the css class with another class and apply it to a div wrapper. However, maybe it would be better to increase z-index in the Select-menu-outer class in order to avoid other people having the same issue.
Cheers, Adriana
+1
I just made the same change because I have a react-select control in a react-bootstrap panel, and immediately below the react-select control is a react-bootstrap ListGroup. With react-bootstrap, the select ListGroupItem has a z-index of 2, meaning that it sits on top of anything styled with .Select-menu-outer. I would recommend setting the z-index of Select-menu-outer to at least 5 by default...
+1
+1
+1
An alternate workaround, avoiding CSS changes, is to use menuContainerStyle i.e.
<Select ... menuContainerStyle={{ zIndex: 5 }} />
https://github.com/JedWatson/react-select/blob/master/src/Select.js#L76
https://github.com/JedWatson/react-select/blob/master/src/Select.js#L1023
anyone solved this problem? menuContainerStyle={{ zIndex: 5 }} not work.
Hi I have a same problem with dropdown styling ? and also the zIndex:5 is not working.
Im using Material-UI for the table row

See prateekjahead's comment: https://github.com/JedWatson/react-select/issues/1010 "HubSpot's react-select-plus takes in dropdownComponent as a prop which solves the issue."
I have the same issue: menuContainerStyle={{ zIndex: 5 }} doesn't work, react-select-plus doesn't work..
.Select-menu-outer {
z-index: 1000;
}
worked for us
Hi, small update on my own soluiton (far from perfect but hey...)
<Select
placeholder="- Sélectionner un club ou coach -"
name="coachName"
value={searchOptions.coachs.filter(coach => coach.active)}
options={searchOptions.coachs}
onChange={coachs => this.setCoachs(coachs)}
onOpen={() => this.setState({ coachSelectOpen: true })}
onClose={() => this.setState({ coachSelectOpen: false })}
multi
/>
{this.state.coachSelectOpen ? <div><br /><br /><br /><br /><br /><br /><br /><br /></div> : null }
I would recommend to just override the .Select-menu-outer styling. We would play an endless battle if someone needs it at 3, then 4.
tried everything i could, no CSS styling would fix it. z-indexed all the html dom tree way up, nothing to do.. All the answers I saw did not work
DeeLindesay's answer worked for me too. .Select-menu-outer { z-index: 1000; }
still running into issue this tried everything suggested here, did we get a solid fix for this? Thanks!
Had this issue with file upload fields. Here's how I fixed it.
.input-group .form-control, .input-group-btn .btn
{
z-index: inherit !important;
}
Would probably work for select fields too.
.is-open { z-index: 100 !important; } This helped me solve the issue
@stanleyume's answer worked for me. Input-groups with date picker. Tnx.
Not working for me either: classes are renamed by jss!
Anyone else managed to solve this?
Surely this can be addressed in the actual component and not with a bunch of work-arounds?