Skip to content

Commit

Permalink
Stop double-pruning
Browse files Browse the repository at this point in the history
  • Loading branch information
micahjon committed Nov 8, 2023
1 parent f287857 commit 1e65813
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions tests-e2e/mock-form/form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,9 @@ export function Form() {
reset,
} = formMethods;

const onSubmit = () => {
console.log(
"Successfully submitted",
pruneHiddenFields(conditions, formMethods.getValues) as FormSchema
);
const onSubmit = (data: BlankFormSchema) => {
// At this point, data has passed validation
console.log("Successfully submitted", data as FormSchema);
reset(getDefaultValues());
};

Expand Down

0 comments on commit 1e65813

Please sign in to comment.