0👍
use the vue forceUpdate methodways to rerender component
import Vue from 'vue';
Vue.forceUpdate();
after you update the latest variable, call this one
this.$forceUpdate();
- [Vuejs]-SyntaxError: Unexpected token … in serialport in node_modules
- [Vuejs]-How to make the data values in vue v-simple-table add up to average?
0👍
Try to use version of vue as 1.0.28
https://cdnjs.cloudflare.com/ajax/libs/vue/1.0.28/vue.min.js
0👍
There are limitations with how arrays can be re-active in Vue (See: https://v2.vuejs.org/v2/guide/list.html#Caveats).
With this in mind, when you do your update, do it like so:
for (var j = 0; j < tempLatest.length; j++) {
this.$set(this.latest, j, tempLatest[j]);
}
Note: I’ve not tested this with your code so you might need to play around a little as you’re currently looping the temp list and the indexes might not match but $set
is the way to go. You might also try:
this.$set(this, 'latest', tempLatest)
instead of looping each item.
Source:stackexchange.com