Within my vue.js web application, I am attempting to switch the positions of two rows in a forum. Below is the code snippet I am using:
export default {
data() {
return {
forums: []
}
},
methods: {
increment(forum, index) {
ForumService.increment(forum)
.then(() => {
let temp = this.forums[index];
this.forums[index] = this.forums[index + 1];
this.forums[index + 1] = temp;
});
}
}
}
However, for some reason nothing seems to be happening when I trigger this action. Can someone point out what might be incorrect within this code?