-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
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
<select> is broken when options values are bound to Dates #7928
Labels
Comments
After looking into it, looseEqual does not handle dates correctly. https://github.com/vuejs/vue/blob/dev/src/shared/util.js#L273 I added a check for dates in looseEqual, but not sure if this is the best way to go about it. Could use a second pair of eyes. 👀 |
posva
added a commit
to posva/vue
that referenced
this issue
Mar 31, 2018
Fix vuejs#7928 thanks to @w3cj for the initial version. This one is using getTime instead of toUTCString because it is much faster to compare
13 tasks
yyx990803
pushed a commit
that referenced
this issue
Oct 24, 2018
f2009
pushed a commit
to f2009/vue
that referenced
this issue
Jan 25, 2019
Fix vuejs#7928 thanks to @w3cj for the initial version. This one is using getTime instead of toUTCString because it is much faster to compare
aJean
pushed a commit
to aJean/vue
that referenced
this issue
Aug 19, 2020
Fix vuejs#7928 thanks to @w3cj for the initial version. This one is using getTime instead of toUTCString because it is much faster to compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version
2.5.16
Reproduction link
https://jsfiddle.net/azpxdt3a/1/
Steps to reproduce
Try select any item except first one.
What is expected?
Item selected.
What is actually happening?
always shows first item. Once any item except first is selected, it's no more possible to select first one (actually, it's possible, as shows correct selected item after the same item was selected twice in a row)
It seems the bug was introduced in ver 2.4.2. Does not reproduced with objects instead of dates: https://jsfiddle.net/pr847ek7/
The text was updated successfully, but these errors were encountered: