-
Notifications
You must be signed in to change notification settings - Fork 492
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When updating props for value, do not change view #38
Comments
this is my package json
|
Please reproduce the issue you're having on snack.expo.io and then post it here. Thanks. |
https://snack.expo.io/@torippana/test-picker I wanna explain about this problem but before I explain it, some small problem here I put link of snack expo. |
Sorry I don't understand the issue you're having. Your nameArray is initialized with strings that match the option's labels, not values. Maybe that's the issue? If not, please try to explain in more detail. |
I am not really understand this part
And, as far as I can guess that it seems you want to change the picker select items dynamically, if that is the case, you need to simply update the state (in your case as mentioned above, add items to example array, or remove items from example array) and the react-native render will/should do the rest for you. |
closing due to inactivity |
I have the same problem in that initially i have an array which is empty [] so no items show up in the dropdown . Then I make a network request and update the local state, which RN picker select is pulling from. I make sure that the state is update and state is re-rendered but the selection does not update with the new values of the updated state item. |
@d7laungani can you recreate the issue on snack.expo.io or share a repo? |
Hi, first of all.
thank you for giving great picker library.
I have question that when updating props for
for example, if I use Array in state below( this Array got from Firebase )
Of cause, View (on simulator) is gonna be
picker has value below
but,when I modified Array using filter method or something
View is gonna be
but I checked state was correct like below
when I modified Array then render method working again but value of picker select still old....
please answer me thank you.
The text was updated successfully, but these errors were encountered: