-
Notifications
You must be signed in to change notification settings - Fork 297
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
zIndex not working #450
Comments
I am using this in expo React native application. |
Hi @mikehardy Thanks for the reply. |
There's a distinct lack of ability to help without a complete example https://stackoverflow.com/help/minimal-reproducible-example The strategy I showed you can actually toggle the zIndexing of the entire app if needed so I believe it should not matter what other packages you are trying to use |
@mikehardy Thanks Let me try the above steps you mentioned . |
<View style={{zIndex: 1000}}> i succeeded to wrap the view outside @ankit-abylle |
@KhanhDuy-123 Thanks for the reply. |
@ankit-abylle Solution: const isAndroid = Platform.OS === 'android';
<View style={! isAndroid && {zIndex: 100}}>
<DropDownPicker
...
dropDownContainerStyle={{backgroundColor:'white'}}
zIndex={100} />
</View>
<View style={! isAndroid && {zIndex: 50}}>
<DropDownPicker
...
dropDownContainerStyle={{backgroundColor:'white'}}
zIndex={50} />
</View> You should also read https://hossein-zare.github.io/react-native-dropdown-picker-website/docs/tutorials/multiple-pickers As @mikehardy has said, Consider reproducing your issue in a Snack.
|
ios: zIndex, android: elevation. it woking |
Putting a zIndex value on the bottom one fixes this |
still didn't work on IOS |
In android sit the z-index of the element that you want it to appear above to -1 |
I am using this component but the dropdown menu is not showing properly.
<DropDownPicker
zIndex={1000}
open={isopen}
value={value}
items={items}
setOpen={setisOpen}
onChangeValue={(value) =>console.log(value)}
setItems={setItems}
setValue={setValue}
dropDownContainerStyle={{ zIndex:10000,backgroundColor:'white',elevation:1000}} />
The text was updated successfully, but these errors were encountered: