-
-
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
Text in select box with v-model (most of the time) does not update, but value does #8603
Comments
Apologies, one last thing: If I have a literal object array in the component's data object, then it seems to work fine. If I use a store or a mixin or anything like that to retrieve an object array, this issue persists. |
Don't use |
That doesn't fix the problem, though... |
So the problem comes from |
Hmm, okay, yeah. Binding Edit: Just checked the source. Yep, it's there. Thanks, dude!! |
I'm not sure this is intentional, I'll come back once I know 🙂 |
the loosEqual implementation had defect. a = {x:1},b={x:2} should looseEqual, but it's not. so looseEqual is not consistent. for the model directive, when the value is type of the regexes, sets,maps,array buffers,typed arrays etc,there will be a insane. so, the implementation of looseEqual must think twice.(the acurate version will be more complex) |
This is actually a duplicate of #7928 and I already submitted a PR for it 😆 |
Version
2.5.17
Reproduction link
https://jsfiddle.net/jcatfour/g6ykuwhe/
Steps to reproduce
Try to change the dropdown value. The text displayed in the select box will almost always stay as "Today", despite the value changing, though it SOMETIMES will actually change to the correct value. Again, as you can see, the actual value is indeed changing even if the select box does not show it.
What is expected?
The options in the select are based on an array of value pairs, (text, val). The text is what should be shown in the select, and the val is what should be actually passed and stored in the data object. I expect the text to change as well as the value when selecting an option.
What is actually happening?
The value changes every time, but the text mostly stays unchanged, BUT the text does very rarely change as expected.
If this were CONSISTENTLY showing the wrong text with the right value, I would assume that I am just doing something wrong, but since it's infrequent, I'm now not so sure. I would not be surprised if I was doing something wrong. I am going insane, please be my savior.
The text was updated successfully, but these errors were encountered: