1👍
✅
Use Vue.set when changing values in the array.
Vue.set(this.heights, j, this.heights[j+1]);
Vue.set(this.heights, j+1, tmp);
Or copy the array, sort the copy and then assign it to this.height
. This will also work.
Source:stackexchange.com