Merge pull request #1578 from colinbes/patch-1

Update Chart.vue to trigger on any change to object data
pull/1280/head^2
Cagatay Civici 2021-11-16 10:21:42 +03:00 committed by GitHub
commit b529fdc272
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 2 deletions

View File

@ -32,8 +32,15 @@ export default {
}
},
watch: {
data() {
this.reinit();
/*
* Use deep watch to enable triggering watch for changes within structure
* otherwise the entire data object needs to be replaced to trigger watch
*/
data: {
handler() {
this.reinit();
},
deep: true
},
type() {
this.reinit();