Skip to content

Android only: onValueChange not fired for placeholder item #604

@williamgurzoni

Description

@williamgurzoni

Describe the bug

After updating @react-native-picker/picker to version v2.7.7 the onValueChange event stopped working when the user presses the placeholder item. This is an Android only issue.

The issue was cause by this PR: react-native-picker/picker#571

To Reproduce

Steps to reproduce the behavior:

  1. Create a dropdown with a placeholder
  2. Test on iOS, the event is fired when the placeholder item is selected
  3. Test on Android, the event is not fired when the placeholder item is selected

Expected behavior

The onValueChange event should be fired consistently in both platforms when the user selects the placeholder item.

Screenshots

N/A

Additional details

  • react-native-picker-select version: v9.1.3
  • react-native version: v0.73.8
  • @react-native-picker/picker: v2.7.7

Reproduction and/or code sample

https://snack.expo.dev/@gurzoni/issue-rnpickerselect---android-not-firing-onvaluechange-for-placeholder-item?platform=android

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