[Vuejs]-Form handeling with an array of object Vuex

0👍

Try to replace data in assignment with copy (spread, for exaple, like below). Objects (and arrays too) assigned as links in JS, so when you change picked array anywhere, you mutate it in the store too.

fillKivaferkoi (state, data) {
    state.kivaferkoi = {...data}
  },

  editPicked (state, data) {
    state.kivaferkoi.picked = [...data]
  }

Leave a comment