Skip to content

Commit

Permalink
Update DynamicForm.vue
Browse files Browse the repository at this point in the history
  • Loading branch information
zAlweNy26 committed Apr 21, 2024
1 parent e4168c3 commit fd79eb0
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/components/DynamicForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,15 @@ const initial = computed(() => {
}, {}) as JSONSettings
})
watchEffect(() => {
dynamicForm.value?.setValues(values.value)
console.log('Form values', dynamicForm.value?.values)
})
watchImmediate(
values,
() => {
console.warn('Initial values', values.value)
dynamicForm.value?.resetForm(values.value)
console.log('Form values', dynamicForm.value?.values)
},
{ deep: true },
)
defineEmits<{
submit: [payload: JSONSettings]
Expand Down

0 comments on commit fd79eb0

Please sign in to comment.