In the following code, I\'m trying to use the getTranslation
object to map values present in originalKeys
array and push the values in a new array
As other answers mentioned this is because you are mutating the original data in a computed property. You should use a method to do this part of the job.
methods:{
changes(tableHeaders){
this.selected = tableHeaders[0];
this.allKeys = tableHeaders;
}
},
computed:{
getkeys(){
// Your code...
this.changes(tableHeaders);
}
},
data: function(){
return{
// Your data...
}
}