multiselect-react-dropdown icon indicating copy to clipboard operation
multiselect-react-dropdown copied to clipboard

Dropdown is covered by other elements

Open ShawnRoller opened this issue 2 years ago • 6 comments

Hi, I like the simplicity of using this library. I'm using this in a react-native-web project.

When I expand the options, the other elements below the options are rendered on top of the option list. I have tried setting the z-index on optionContainer but it seems to have no effect.

The workaround is for me to set a zIndex on all of my dropdowns manually, which is not ideal.

I would like to see a solution for overriding the CSS to explicitly set the z-index so that the optionContainer always appears over other elements when it is expanded.

Thanks!

Screen Shot 2021-10-15 at 12 45 45 .

ShawnRoller avatar Oct 15 '21 16:10 ShawnRoller

Hey. I have a similar issue, and I am also interested by a fix for this. In the meantime, would you mind sharing an example of how you have set your zIndex ? Thanks for sharing.

njaouen avatar Nov 17 '21 10:11 njaouen

I had to set the zIndex of the view that contains the dropdown, and it is very hacky.

{fieldContainers.map((field, index) => ( <View style={{ zIndex: 999 - index }}><Dropdown… /></View> )

Hope that helps.

ShawnRoller avatar Nov 18 '21 04:11 ShawnRoller

I had to set the zIndex of the view that contains the dropdown, and it is very hacky.

{fieldContainers.map((field, index) => ( <View style={{ zIndex: 999 - index }}><Dropdown… /></View> )

Hope that helps.

Thanks !

njaouen avatar Nov 21 '21 17:11 njaouen

Seems not reproduceable in browser, will check in react-native.

srigar avatar Dec 12 '21 06:12 srigar

Also having this issue in NextJS. Tried adding a z-index to the optionListContainer class and had no success.

DustinsCode avatar Dec 16 '21 15:12 DustinsCode

Having the same issue. Adding z-index to "optionListContainer" class in styles prop don't work.

HastiSutaria avatar May 13 '24 06:05 HastiSutaria