Skip to content

Commit

Permalink
fix(useForm): remove extra computed from formData
Browse files Browse the repository at this point in the history
  • Loading branch information
m0ksem committed Sep 23, 2024
1 parent 4f00151 commit 280534b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/ui/src/composables/useForm/useFormParent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const useFormParent = <Names extends string = string>(options: FormParent
return acc
}, {} as Record<Names, UnwrapRef<FormFiled>>))
const formData = computed(() => fields.value.reduce((acc, field) => {
if (unref(field.name)) { acc[unref(field.name) as Names] = field.value }
if (unref(field.name)) { acc[unref(field.name) as Names] = unref(field.value) }
return acc
}, {} as Record<Names, UnwrapRef<FormFiled['value']>>))
const isValid = computed(() => fields.value.every((field) => unref(field.isValid)))
Expand Down

0 comments on commit 280534b

Please sign in to comment.