[Vuejs]-Vue.js data() properties are sync after load values using axios

1👍

The problem is that both properties are referencing the same array object.

A common solution is to create a copy of it, either using the spread syntax or Array.from:

// ...
      this.tags = [...response.data.hashtags]
      this.selectTags= [...response.data.hashtags]
//...

Leave a comment