-
-
Notifications
You must be signed in to change notification settings - Fork 33.6k
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 <select> model and the option list changed at the same time, model may incorrectly set to undefined
#10614
Comments
…d` in some corner case fix vuejs#10614
as a workaround you can set a |
It has nothing to do with the key, add key or keys do not resolve the problem. |
A workaround is only a temporary fix for the problem for you or anybody to have a solution until a fix is released: The original problem has nothing to deal with keys yet, adding a |
@posva Maybe im reading the description incorrectly but this sounds like expected behavior. If i change the list of available options, and then change the value to something not in the list of available options, it should be |
It should keep the set value instead of changing it to |
This issue is owned by the logic of the code: |
Version
2.6.10
Reproduction link
https://jsfiddle.net/4fyrj95L/
Steps to reproduce
set model binded to select element and the array that iterated the option list at the same time
make sure the new model value do not match any of the new options
the model will be set to
undefined
What is expected?
model value to be set to
1
What is actually happening?
model's value set to
undefined
This bug only appears when model and the options changed at the same and the new model value does not match any option, other situations behaves correctly as far as I tested.
The text was updated successfully, but these errors were encountered: