Skip to content

Setting useNativeAndroidPickerStyle to false makes picker unusable on Android #465

@jlovoi

Description

@jlovoi

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

  • Device: 2016 Galaxy Tab A
  • OS: Android 5.0 Lollipop
  • react-native-picker-select version: 8.0.4
  • react-native version: 0.65.1
  • expo sdk version: 30

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions