Skip to content

Form is resetting after calling onSubmit #1769

Discussion options

You must be logged in to vote

Finally I found it...

I had some parts of the form extracted into methods like

export default function MyForm() {

  const TextField = ({name, label, ...props}) {
     // render field
  }
}

after moving them out of my class it works now:

const TextField = ({name, label, ...props}) {
   // render field
}

export default function MyForm() {

}

Replies: 1 comment

Comment options

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