Open spdev3000 opened 7 months ago
FYI: this is "not a bug" in that those items are required for the Picker to validate itself. I've updated the issue title and labelling to outline this as a feature request for that reason. This does align with some research that we have planned, however I can't speak to any timing around that research having any practical side effects at this time.
If you know the value
at initial render, and would like not to append the items/their values, you may look into inserting a dummy Item that possessed that value and removing that when the actual values were later available. Or, if it were acceptable to your interface, you could leave the Picker without a value until you were prepared to populate the Items and then supply a value at that point, when it would actually be possible to validate that value.
Code of conduct
Impacted component(s)
Picker
Expected behavior
When user renders a Picker that have already a value set, but the values of the menu-items will be set after initialization - Picker should run some re-comparing and update the current selection state visible in the Picker.
Actual behavior
When user renders a Picker that have already a value set, but the values of the menu-items will be set after initialization (as this happens sometimes in our project) - the value won't be re-compared to selected value and no selection will be shown in Picker.
Screenshots
No response
What browsers are you seeing the problem in?
Chrome
How can we reproduce this issue?
Sample code that illustrates the problem
No response
Logs taken while reproducing problem
No response