I'm really struggling to understand what the ... want with this Vue component! Can someone please help me out? Here is my code:
var groupadding = new Vue({
el: '#groupAdd',
data:{
currentFullData: [],
localData: []
},
methods: {
getDepartment() {
var sendData = id; // just an example
this.$http.post('some api', sendData, {emulateJSON: true})
.then( resp => {
this.currentFullData = resp.data;
}
},
getLocalDepartment() {
this.localData = this.currentFullData;
}
}
})
In the 'currentFullData' object, for example I have 4 boolean fields: 'create', 'read', 'update', 'delete'
However, when these fields in 'localData' are changed, they also reflect in 'currentFullData'. Can anyone explain why this is happening?!?!?!