-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
watch and props changes are not in an update queue #1521
Comments
There is no problem for most scenes, but when using input, you will not be able to input Chinese like https://jsbin.com/neyuqekusi/edit?html,console,output . |
The watcher is triggered during the update of the child component itself and queued after. You can use a sync watcher: watch: {
value: {
handler(val) {
console.log('watch value change')
this.stateValue = val;
},
flush: 'sync'
}
} Or, even better, use a computed instead of a watcher. |
Closed
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Version
3.0.0-beta.18
Reproduction link
https://jsbin.com/daxofotupi/edit?html,console,output
Steps to reproduce
input some characters and view the log, it will trigger two updates.
What is expected?
trigger one update
What is actually happening?
trigger two updates
The text was updated successfully, but these errors were encountered: