lawnstarter / react-native-picker-select

🔽 A Picker component for React Native which emulates the native <select> interfaces for iOS and Android
https://npmjs.com/package/react-native-picker-select
MIT License
1.74k stars 497 forks source link

Setting `useNativeAndroidPickerStyle` to false makes picker unusable on Android #465

Open jlovoi opened 2 years ago

jlovoi commented 2 years ago

Describe the bug
Setting property useNativeAndroidPickerStyle to false on the picker causes the dropdown menu of options to appear and immediately disappear upon pressing the component. This issue does not occur when running the app locally, but affects all Android devices which have installed and run the app. I tried using fixAndroidTouchableBug={true} with no luck.

To Reproduce
Versions: "react-native": "0.65.1", "react-native-picker-select": "^8.0.4", "@react-native-picker/picker": "^2.1.0",

<RNPickerSelect useNativeAndroidPickerStyle={false} style={ { inputAndroid: { color: 'rgba(0, 0, 0, 1)', fontSize: 40 }, } } fixAndroidTouchableBug={true} onValueChange={(value) => dispatch(changeOption(value))} items={[{value: 0, label: 'option1'}, {value: 1, label: 'option2'}]} />

Expected behavior
When using your own styling for the component, the options should not disappear immediately after opening, but only disappear whenever a touch-away action is detected or an option is selected.

Screenshots
N/a

Additional details

Reproduction and/or code sample
This seems to work when running on the snack, but upon deploying the app and installing on an android device the bug persists. https://snack.expo.dev/_2EsSY0SX

NickWhiu commented 2 years ago

Any workaround for this bug?