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
As you said, this is a bug, or rather a design flaw. Need to add support for fully controllable values. Right now the internal value is always updated. Workaround below but will keep this open until a fix is released.
The onChange handler is set after the value has been updated. What happens in your code is that you stop tracking the value after 2 has been chosen. What you need to do is to slice the values in your else, like this:
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
https://codesandbox.io/s/busy-thompson-zhldb?file=/src/App.js
Expected behavior
selected values should reflect the value prop passed in
Screenshots
See code sandbox
Desktop (please complete the following information):
Additional context
It seems to me like this should work, but if there's a different way to handle controlling this input I would love to know how.
The text was updated successfully, but these errors were encountered: