-
Notifications
You must be signed in to change notification settings - Fork 716
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
Adding Picker.Items after initial render fails to retrieve labels for selected items #2428
Comments
same to me, any solution for this ? |
after update to 7.0.0, the picker become strange. any solution for this? |
It looks like Picker items get set as state only on initial creation: src/components/picker/index.tsx. In our app, we've been able to work around this by updating the key prop on the Picker when the items change to force a state reset. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Any updates? |
I have found a workaround, add renderPicker to show the label.
|
@siteassist-benjamin @trofima |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
I have the same problem with the newest version 7.8.0 |
The issue still persists on the latest version. |
I have the same issue. For me it occurs when I change the options that I supply to the picker after initially generated. So I have 2 pickers, and the options of the second picker are based on the value of the first picker. When I click on the second picker I can choose a new value, and that value is correctly selected, but it does not display as correctly selected. I am using the solution provided by @jiteshgolecha above |
Can you please try passing the |
Description
Related to
Unfortunately there is no mention of this online, I tried very hard to find it.
Steps to reproduce
Expected behavior
Expected behavior would be for the input storing the currently selected value to show the selected label
Actual behavior
When an item is selected from the modal picker list - which has all the correct labels, the input field showing the selected item after the modal is closed is blank
Screenshots/Video
Environment
Affected platforms
The text was updated successfully, but these errors were encountered: