Issue with Vue's async event loop
See original GitHub issue[ ] Bug report => search github for a similar issue or PR before submitting
[ ] Feature request
[x] Other, please describe
Hi there,
Thank you for this component. I ran into an issue caused by Vue’s async event loop.
To reproduce, go to this fiddle: https://jsfiddle.net/6b94mxes/
- Open calendar, the time should be updating every second
- Scroll up once on the minutes location to increase the minute by one. Do this right before the seconds is about to change to the next second
Expected behavior: The minute place will increase and the calendar will stop updating until one minute has passed.
Current behavior: DOM input takes a few moments to change v-model. So this.date is not updated quickly enough and the minute place reverts back to what it was.
Any advice on how to work around this?
Thanks!
Issue Analytics
- State:
- Created 6 years ago
- Comments:10 (5 by maintainers)
Top Results From Across the Web
Loop out async data in vue component - Stack Overflow
Thanks for your answer. With your first example the error are gone but the loop never runs again (when the data are loaded)...
Read more >Reactivity, Async, Render Problem - Vue Forum
We just ran into a slight problem that causes render to be executed synchronously rather than async. Once you're in the async's next-tick ......
Read more >Vue.js Asynchronous Update Queue - Coding Explained -
We just saw how Vue.js reacts to any changes that we make to our data properties and updates the DOM accordingly. This is...
Read more >Asynchronous JavaScript: The Event Loop, Callbacks ...
When the network request completes, the JavaScript runtime removes the asynchronous function from the callstack. Then the event loop picks ...
Read more >Asynchronous JavaScript - Learn web development | MDN
In this article, we'll learn about synchronous and asynchronous programming, why we often need to use asynchronous techniques, and the problems ...
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
This will never solve. This is how js works.
@bhulsman Your issue is different. When user clicks on reset (clear) button; v-model value needs to be updated so component emits input event with new value.