Not updating DOM v-for after mutation state

Hi,

I got an issue with updating DOM after mutating state.
state looks like :

state: {
    context: {},
    current_dossier: {},
  }
//my mutation
[types.SET_CURRENT_DOSSIER] (state, payload) {
      // state.current_dossier = payload
      Vue.set(state, 'current_dossier', payload) // I've tried a lot of thing
    }

payload looks like:

{
list_of: [
{thing: 'one' }
]
}

template looks like :

<thing-list v-for="(thing, index) in current_dossier.list_of" :key="index" :lien_dossier_ticket="thing"> </ticket-dossier-list>

After using mutation, if ‘thing’ value change In devtools, I see that but the dom is not reloaded.

Hi. I don’t know why it doesn’t work but your template assumed that current_dossier has an attribute list_of which isn’t true in the beginning. Would it work better if you initialize your data as:

state: {
    context: {},
    current_dossier: {list_of: []},
  }

And in your mutation do this?

[types.SET_CURRENT_DOSSIER] (state, {list_of}) {
      state.current_dossier.list_of = list_of
    }

Hi,
Thanks for your reply.
I think also that It’s about that part of the doc " Vue cannot detect property addition or deletion ." Change-Detection Caveats