react-native-picker-select
react-native-picker-select copied to clipboard
Android only: onValueChange not fired for placeholder item
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:
- Create a dropdown with a placeholder
- Test on iOS, the event is fired when the placeholder item is selected
- 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