Alan Fitzpatrick
Alan Fitzpatrick

Reputation: 181

Vuex Re-render of v-for with Deep change

When using Vuex with Arrays of Objects a v-for doesn't update as expected

The watch method reacts to a mapped Getter change but the v-for element is not updated.

Is there a way to force a rerender from the watch function?

Upvotes: 0

Views: 1450

Answers (2)

Tyler
Tyler

Reputation: 11509

Try using Vue.set or [yourArray].splice as shown in the caveats here: https://v2.vuejs.org/v2/guide/list.html#Caveats

Upvotes: 1

Sebastian Schulz
Sebastian Schulz

Reputation: 391

Try to make a computed property based on watched variable and loop over it.

Upvotes: 0

Related Questions