-
-
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
set watch deep: true, when data changes, val === oldval is true #2649
Comments
This is working as intended, because they are the same object. |
I have a very deep object and some key in it changes, is there any method I can get the changed key name, value and it's parent object? I don't need a whole object, thanks. |
@murphymeng You may want to clone the original object and compare the clone with the modified object during |
@murphymeng you would have to:
|
Wanted to share another solution that was provided by a user as an answer to my relative question on StackOverflow:
With a note: "if you are adding or removing something from the original array, just call the vm.setValue() method again" |
@phanan Thank you! It's working. I think for very deep and complex object plus key occurrence uncertain, this way is much easier. |
Vue.js version
1.0.16
Reproduction Link
Steps to reproduce
What is Expected?
What is actually happening?
The text was updated successfully, but these errors were encountered: