[Vuejs]-Vuetify v-data-table with CRUD actions: dialog with dynamic forms wont work with v-model

1πŸ‘

βœ…

I got the problem. So the data section of FormBuilder is executed once only. So first time it works fine but second time it’s not executing the data section.

You need to add a watch on the value variable and assign the data in formData again.

You can also use immediate:true

Ex-

watch: {
  test: {
    immediate: true,
    handler(newVal, oldVal) {
      console.log(newVal, oldVal)
    },
  },
},

Sandbox – https://codesandbox.io/s/dreamy-brook-em6lk

πŸ‘€Pratik Patel

Leave a comment