Skip to content

Is it possible to have nested ValidatedForm #213

Discussion options

You must be logged in to vote

I just found the solution myself.
If you ever have a similar issue, add id to the validated form and use the same ID in the button's submit property:

const formId = 'add-link-form'
  
<ValidatedForm
  action="#"
  validator={validator}
  defaultValues={defaultValues}
  onSubmit={onSubmit}
  id={formId}
>
  <Button form={formId}>
    Update
  </Button>
</ValidatedForm>

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by piotrkulpinski
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant