Dropdown getting behind the other Views even with a higher zIndex value
See original GitHub issueReact Native version: 0.64 react-native-dropdown-picker: 5.1.7
Dropdown is working fine on an Android device but while running it on an iOS device it is not respecting the zIndex value:

My code for dropdown:
<DropDownPicker
style={{
borderTopLeftRadius: 17,
borderTopRightRadius: 17,
borderBottomLeftRadius: 17,
borderBottomRightRadius: 17,
backgroundColor: '#99ccff',
height: 35,
}}
containerStyle={{
width: 110,
marginTop: 10,
...containerStyle,
}}
itemStyle={{
flexDirection: 'row',
justifyContent: 'flex-start',
}}
textStyle={{
fontSize: 10,
fontWeight: '500',
}}
selectedItemLabelStyle={{
color: '#0066cc',
}}
arrowIconStyle={{
marginVertical: -3,
paddingTop: 0,
paddingBottom: 0,
}}
zIndex={999999}
min={5}
items={items}
onChangeValue={handleChange}
searchable={false}
open={isOpen}
value={value}
listMode="SCROLLVIEW"
setOpen={setIsOpen}
setValue={setValue}
onOpen={() => setDropDownOpen(true)}
onClose={() => setDropDownOpen(false)}
ref={dropDownRef}
{...props}
/>
I tried giving the view a negative z-index but that did not help either
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
CSS: Dropdown menu gets hidden behind the content
I can confirm the menu is there, but it gets hidden behind the underlying content even though it has an absolute position with...
Read more >4 reasons your z-index isn't working (and how to fix it)
Solution: Move the modal outside of the content parent, and into the main stacking context of the page. ... Now, the modal element...
Read more >Diagnosis: z-index (submenu hidden behind content)
z-index values are relative to their element's siblings only; outside of that parent container, they have no effect. So if Element B is...
Read more >picker beeing rendered below other components #148 - GitHub
I went through the source code and added high z-index values of like 1000 to everything in the render method and that did...
Read more >Using z-index - CSS: Cascading Style Sheets - MDN Web Docs
If several elements share the same z-index value (i.e., they are placed on the same layer), stacking rules explained in the section Stacking ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Going with the MODAL type of dropdown for the iOS version for now, not able to get the zIndex issue resolved. Closing the issue as i think something is missing from my end as the snack worked correctly on iOS.