v-model don't get updated before on-change method execute
See original GitHub issueI’m submitting a … (check one with “x”)
[X] Bug report => search github for a similar issue or PR before submitting
[ ] Feature request
[ ] Other, please describe
Tell about your platform
- flatPickr version : 4.2.4
- Vue.js version : 2.5.8
- Browser name and version : Chrome 63.0.3239.132 (Official Build) (64-bit)
- This package version : 6.2.0
Current behavior I want to emit event with value bound to v-model in method that execute @on-change event, but problem is that emitted value is previous one (null on first change).
Expected behavior Emitted value should be one that has just been selected.
Minimal reproduction of the problem with instructions Example is in codesandbox link, code is in /components/Hello.vue. You can see how value changes in console (I am a bit old school, so console.log).
https://codesandbox.io/s/6l44rkvpvw
Any help or advice what is wrong or what am I doing wrong so this happens would be very appreciated!
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
How to fire an event when v-model changes? - Stack Overflow
I want to add that when using keyDown, the model only seems to update after the event fires. When using input, it seems...
Read more >Select element with v-model and v-on="change:onChange ...
Hi, I noticed that in FF onChange event is triggered before v-model variable is updated. In all other browsers variable is updated first....
Read more >Vue-Multiselect | Vue Select Library
custom-label accepts a function with the option object as the first param. It should return a string which is then used to display...
Read more >Documentation - SolidJS · Reactive Javascript Library
Solid's overall approach to reactivity is to wrap any reactive computation in a function, and rerun that function when its dependencies update.
Read more >Adding a new todo form: Vue events, methods, and models
Binding data to inputs with v-model · Add a data() method to our ToDoForm component object that returns a label field. We can...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@Glideh
Move your
input1
,input2
,input3
to a parent object and add a deep watcher to it.Thank you very much! I didn’t realised this works that way