From a740599146206354e8ac1f54735fa2a5c67f0f5f Mon Sep 17 00:00:00 2001 From: Mert Sincan Date: Wed, 23 Oct 2024 23:07:19 +0100 Subject: [PATCH] Update ResolversDoc.vue --- apps/showcase/doc/forms/ResolversDoc.vue | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/apps/showcase/doc/forms/ResolversDoc.vue b/apps/showcase/doc/forms/ResolversDoc.vue index ab48cc786..aaeee7961 100644 --- a/apps/showcase/doc/forms/ResolversDoc.vue +++ b/apps/showcase/doc/forms/ResolversDoc.vue @@ -247,7 +247,7 @@ watch(selectedSchema, (newSchema) => { changeResolver(newSchema); }); -function changeResolver(schema) { +const changeResolver = (schema) => { if (schema === 'Zod') { resolver.value = zodResolver( z.object({ @@ -287,12 +287,10 @@ function changeResolver(schema) { } } -function handleSubmit() { - resolver.value({ values: initialValues.value }).then(({ valid }) => { - if (valid) { - toast.add({ severity: 'success', summary: 'Form is submitted.', life: 3000 }); - } - }); +const onFormSubmit = ({ valid }) => { + if (valid) { + toast.add({ severity: 'success', summary: 'Form is submitted.', life: 3000 }); + } } <\/script> `