react-native-picker-select icon indicating copy to clipboard operation
react-native-picker-select copied to clipboard

Android only: onValueChange not fired for placeholder item

Open williamgurzoni opened this issue 1 year ago • 3 comments

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: https://github.com/react-native-picker/picker/pull/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

williamgurzoni avatar Jul 29 '24 21:07 williamgurzoni