Skip to content
Discussion options

You must be logged in to vote

Looks like an issue as the reset form method works as expected. See #7652.
Meanwhile you can try using the [the reset form method](https://react-hook-form.com/api/useform/reset method

const { reset, getValues } = useForm()
reset({ ...getValues(), xmlFile: null })

Take a look at the Props section of RHF docs on reset to see what additional options you want to provide to keep you form state

Replies: 4 comments 5 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@davdet
Comment options

@bluebill1049
Comment options

@DanB-dev
Comment options

Answer selected by bluebill1049
Comment options

You must be logged in to vote
2 replies
@ghost
Comment options

@danielmarcano
Comment options

Comment options

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