You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When either one of item or value changes the component re-renders and the method getDerivedStateFromProps runs. In this method at the return the following validation is made:
This form of validation is causing me the following error:
To Reproduce
Steps to reproduce the behavior:
In my case I'm setting the items values from a data stored in redux, whenever this data is updated and the items change, but value doesn't, the error occurs.
Expected behavior
Not crash if only one of itemsChanged or selectedItemChanged changes.
According to this comment only had to change the return to the following to prevent the error:
If applicable, add screenshots to help explain your problem.
Smartphone (please complete the following information):
Device: Samsung Galaxy S8 - Any iPhone Simulator
OS: Android 8 - iOS 12
react-native-picker-select version: 5.2.2
react-native version: 0.55.4
react version: 16.3.2
Reproduction and/or code sample
Provide a link to a reproduction of this issue on https://snack.expo.ioor a good explanation on why you can not. Not including a link will result in a significant delay in our ability to address this issue.
The text was updated successfully, but these errors were encountered:
Describe the bug
When either one of
item
orvalue
changes the component re-renders and the methodgetDerivedStateFromProps
runs. In this method at the return the following validation is made:This form of validation is causing me the following error:
To Reproduce
Steps to reproduce the behavior:
In my case I'm setting the
items
values from a data stored in redux, whenever this data is updated and theitems
change, butvalue
doesn't, the error occurs.Expected behavior
Not crash if only one of
itemsChanged
orselectedItemChanged
changes.According to this comment only had to change the return to the following to prevent the error:
Screenshots
If applicable, add screenshots to help explain your problem.
Smartphone (please complete the following information):
Reproduction and/or code sample
Provide a link to a reproduction of this issue on https://snack.expo.io or a good explanation on why you can not. Not including a link will result in a significant delay in our ability to address this issue.
The text was updated successfully, but these errors were encountered: