hossein-zare / react-native-dropdown-picker

A single / multiple, categorizable, customizable, localizable and searchable item picker (drop-down) component for react native which supports both Android & iOS.
https://hossein-zare.github.io/react-native-dropdown-picker-website/
MIT License
995 stars 296 forks source link

zIndex and zIndexInverse not working with disabled prop for multiple pickers #545

Closed yogendrajs closed 2 years ago

yogendrajs commented 2 years ago

when having multiple pickers, if the second dropdown is disabled unless the first dropdown has been selected with a value, I use the disabled prop with the useState hook, but that doesn't seem to be working in Android, I'm unable to select the value from the second dropdown (after it is enabled)

hossein-zare commented 2 years ago

@yogendrajs Please reproduce the behavior using an expo snack.

yogendrajs commented 2 years ago

@yogendrajs Please reproduce the behavior using an expo snack.

@hossein-zare, please refer to this snack - https://snack.expo.dev/@yogendraexpo/react-native-dropdown-picker-bug

This problem only arises if the dropdowns are disabled for the very first time (see the second dropdown overlapping with the third one when selecting a value). Also, note that this is working fine in iOS, just the Android is causing the issue.

hossein-zare commented 2 years ago

I released a new version v5.4.2.

Make sure that fixes the bug. Snack is unable to find the new version so try it on your real project.

"react-native-dropdown-picker": "5.4.2"
yogendrajs commented 2 years ago

thanks for the quick response @hossein-zare, I'll definitely give it a try. Can you please mention what was causing the issue?

hossein-zare commented 2 years ago

https://snack.expo.dev/UQMiu9ntS works well.

The disabledStyle styles were being applied to the wrong view, The Avoid inappropriate styles rule was broken.

yogendrajs commented 2 years ago

Gotcha! Thank you, closing this issue here :)