Skip to content

docs: add keepIsSubmitSuccessful to reset options table#1202

Merged
bluebill1049 merged 3 commits intoreact-hook-form:masterfrom
dfedoryshchev:docs/keep-is-submit-successful
Apr 19, 2026
Merged

docs: add keepIsSubmitSuccessful to reset options table#1202
bluebill1049 merged 3 commits intoreact-hook-form:masterfrom
dfedoryshchev:docs/keep-is-submit-successful

Conversation

@dfedoryshchev
Copy link
Copy Markdown
Contributor

Closes #1050.

Adds a missing entry for the keepIsSubmitSuccessful option in the reset() props table on docs/useform/reset.
The flag was added to the main repo in react-hook-form#9640 (commit 5dbe834) but never documented here.

Commits:

  • docs: add keepIsSubmitSuccessful to reset options table - the +1 row addition
  • chore: prettier format reset.mdx table alignment - auto-format reflow from prettier --write after the new row introduced a wider column

@vercel
Copy link
Copy Markdown
Contributor

vercel bot commented Apr 19, 2026

@dfedoryshchev is attempting to deploy a commit to the BEEKAI OSS Team on Vercel.

A member of the Team first needs to authorize it.

@netlify
Copy link
Copy Markdown

netlify bot commented Apr 19, 2026

Deploy Preview for sage-cassata-31d224 ready!

Name Link
🔨 Latest commit fa56ee2
🔍 Latest deploy log https://app.netlify.com/projects/sage-cassata-31d224/deploys/69e544e49199e800086f12d1
😎 Deploy Preview https://deploy-preview-1202--sage-cassata-31d224.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the reset() API documentation to include the missing keepIsSubmitSuccessful option so the docs match the behavior available in react-hook-form.

Changes:

  • Add a new keepIsSubmitSuccessful row to the reset() options table.
  • Reformat the markdown table alignment (Prettier reflow).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

| `values` | | <TypeText>object \| (values: Object) => Object </TypeText> | An optional object to reset form values, and it's recommended to provide the **entire** defaultValues when supplied. |
| `options` | `keepErrors` | <TypeText>boolean</TypeText> | All errors will remain. This will not guarantee with further user actions. |
| | `keepDirty` | <TypeText>boolean</TypeText> | `DirtyFields` form state will remain, and `isDirty` will temporarily remain as the current state until further user's action.<br/><br/>**Important:** this keep option doesn't reflect form input values but only dirty fields form state. |
| | `keepDirtyValues` | <TypeText>boolean</TypeText> | `DirtyFields` and `isDirty` will remained, and only none dirty fields will be updated to the latest rest value. [Check out the example.](https://codesandbox.io/s/react-keepdirtyvalues-o8to91)<br/><br/>**Important:** formState `dirtyFields` will need to be subscribed. |
| `values` | | <TypeText>object \| (values: Object) => Object </TypeText> | An optional object to reset form values, and it's recommended to provide the **entire** defaultValues when supplied. |
| `options` | `keepErrors` | <TypeText>boolean</TypeText> | All errors will remain. This will not guarantee with further user actions. |
| | `keepDirty` | <TypeText>boolean</TypeText> | `DirtyFields` form state will remain, and `isDirty` will temporarily remain as the current state until further user's action.<br/><br/>**Important:** this keep option doesn't reflect form input values but only dirty fields form state. |
| | `keepDirtyValues` | <TypeText>boolean</TypeText> | `DirtyFields` and `isDirty` will remained, and only none dirty fields will be updated to the latest rest value. [Check out the example.](https://codesandbox.io/s/react-keepdirtyvalues-o8to91)<br/><br/>**Important:** formState `dirtyFields` will need to be subscribed. |
| `values` | | <TypeText>object \| (values: Object) => Object </TypeText> | An optional object to reset form values, and it's recommended to provide the **entire** defaultValues when supplied. |
| `options` | `keepErrors` | <TypeText>boolean</TypeText> | All errors will remain. This will not guarantee with further user actions. |
| | `keepDirty` | <TypeText>boolean</TypeText> | `DirtyFields` form state will remain, and `isDirty` will temporarily remain as the current state until further user's action.<br/><br/>**Important:** this keep option doesn't reflect form input values but only dirty fields form state. |
| | `keepDirtyValues` | <TypeText>boolean</TypeText> | `DirtyFields` and `isDirty` will remained, and only none dirty fields will be updated to the latest rest value. [Check out the example.](https://codesandbox.io/s/react-keepdirtyvalues-o8to91)<br/><br/>**Important:** formState `dirtyFields` will need to be subscribed. |
| | `keepDefaultValues` | <TypeText>boolean</TypeText> | Keep the same defaultValues which are initialised via `useForm`.<ul><li>`isDirty` will be checked again: it is set to be the result of the comparison of any new values provided against the original `defaultValues`.</li> <li>`dirtyFields` will be updated again if values are provided: it is set to be result of the comparison between the new values provided against the original `defaultValues`.</li></ul> |
| | `keepIsSubmitted` | <TypeText>boolean</TypeText> | `isSubmitted` state will be unchanged. |
| | `keepIsSubmitSuccessful` | <TypeText>boolean</TypeText> | `isSubmitSuccessful` state will be unchanged. |
| | `keepTouched` | <TypeText>boolean</TypeText> | `isTouched` state will be unchanged. |
@bluebill1049 bluebill1049 merged commit 6400d6f into react-hook-form:master Apr 19, 2026
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Documentation: keepIsSubmitSuccessful missing from documentation

3 participants