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,9 +32,16 @@ export default {
} }
}, },
watch: { watch: {
data() { /*
* 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(); this.reinit();
}, },
deep: true
},
type() { type() {
this.reinit(); this.reinit();
}, },