Skip to content
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

Multiple Picker dropdown gets hidden below another Picker component in Android #33

Closed
sudhirkumarojhaa opened this issue Jun 18, 2020 · 11 comments
Labels
duplicate This issue or pull request already exists

Comments

@sudhirkumarojhaa
Copy link

sudhirkumarojhaa commented Jun 18, 2020

Describe the bug
A clear and concise description of what the bug is.
When the dropdown is opened. It gets behind another picker component below it.

To Reproduce
Steps to reproduce the behavior:


Create an expo snack:
https://snack.expo.io/

Expected behavior
A clear and concise description of what you expected to happen.
the visible dropdown should override every other component

Screenshots
If applicable, add screenshots to help explain your problem.

Supposed to work like this in both platforms
iOS screenshot

Screenshot 2020-06-18 at 6 24 07 PM

Works like this in Android which is an issue

Screenshot 2020-06-18 at 6 21 47 PM

Info (please complete the following information):

  • OS: [iOS, Android]
  • Package version [e.g. 22]

Additional context
Add any other context about the problem here.

@sudhirkumarojhaa sudhirkumarojhaa changed the title Multiple Picker dropdown gets hidden below the another Picker component in Android Multiple Picker dropdown gets hidden below another Picker component in Android Jun 18, 2020
@hossein-zare
Copy link
Owner

@hossein-zare
Copy link
Owner

#32

@hossein-zare hossein-zare added the duplicate This issue or pull request already exists label Jun 18, 2020
@kaurrJaspreet
Copy link

I am still getting this issue

@kaurrJaspreet
Copy link

anyone can share the sample code please?

@hossein-zare hossein-zare reopened this Jun 24, 2020
@hossein-zare
Copy link
Owner

Hello @jaspreetjk
https://snack.expo.io/@hossein-zare/823437

If this doesn't help you, You can share your own code snippet with the containerStyle prop.

@turch
Copy link

turch commented Jul 11, 2020

@hossein-zare
https://snack.expo.io/4PUy_IzLh

Your snippet, modified to show the bug.

@hossein-zare hossein-zare reopened this Jul 11, 2020
@hossein-zare
Copy link
Owner

@turch

DropDownPicker wrapped by <View style={{backgroundColor: '...'}}>
Remove the backgroundColor from the parent element.
#40 (comment)

Multiple Pickers
<DropDownPicker zIndex={5000} />
<DropDownPicker zIndex={4000} />
<DropDownPicker zIndex={3000} />

<View
    style={{
        ... // No backgroundColor

        ...(Platform.OS !== 'android' && {
            zIndex: 20
        })
    }}
>
    <DropDownPicker ... />
</View>
<View
    style={{
        ... // No backgroundColor

        ...(Platform.OS !== 'android' && {
            zIndex: 10
        })
    }}
>
    <DropDownPicker ... />
</View>

https://github.com/hossein-zare/react-native-dropdown-picker#zindex-conflicts-untouchable-items-overlapping-pickers

@turch
Copy link

turch commented Jul 11, 2020

Ah my bad, I saw the thing about the background color but missed the increasing zIndex.

From reading some other issue report, not being able to use background color is a React Native issue, correct?

@hossein-zare
Copy link
Owner

Yes, There are some other properties that cause unexpected behaviors.

@sudhirkumarojhaa
Copy link
Author

Hi Hoseein

I have integrated the Dropdown picker in the flatlist so it is rendering it multiple times. In the android the dropdown overalps with the rest of the content which is not dropdown. I have added all the zindex and others which are laid in the REadme. Can you help

@yogendrajs
Copy link

hi @hossein-zare, I see how zIndex works for multiple pickers at this page - https://hossein-zare.github.io/react-native-dropdown-picker-website/docs/tutorials/multiple-pickers
but, if a dropdowns is dependent on another dropdown (where disabled prop is being used), zIndex & zIndexInverse don't seem to work for me, can you please help?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

5 participants