Vue.set to set metrics object, array assignment won't be picked up by Vue listeners
This commit is contained in:
parent
e82edc8338
commit
9c44d047ac
1 changed files with 1 additions and 1 deletions
|
@ -53,7 +53,7 @@ Vue.component('sensors', {
|
||||||
onSensorEvent: function(event) {
|
onSensorEvent: function(event) {
|
||||||
const data = event.data;
|
const data = event.data;
|
||||||
for (const [name, value] of Object.entries(data)) {
|
for (const [name, value] of Object.entries(data)) {
|
||||||
this.metrics[name] = value;
|
Vue.set(this.metrics, name, value);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue