Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Warn users that resetting the form while passing values will also reset defaultValues #1132

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
shaundavin13 wants to merge 3 commits into react-hook-form:master
base: master
Choose a base branch
Loading
from shaundavin13:warn-users-reset-sets-default-values

Conversation

Copy link

@shaundavin13 shaundavin13 commented Mar 20, 2025

Added documentation that warns users that when calling reset with values, the form's defaultValues updates accordingly, which means subsequent calls to reset will use the previously passed values instead of the form's original defaultValues. This helps developers who call reset with API responses to be aware that subsequent reset only revert back to that API response

...et defaultValues
Added documentation that warns users that when calling `reset` with `values`, the form's `defaultValues` updates accordingly, which means subsequent calls to `reset` will use the previously passed `values` instead of the form's original `defaultValues`. This helps developers who call `reset` with API responses to be aware that subsequent `reset` only revert back to that API response
Copy link

vercel bot commented Mar 20, 2025
edited
Loading

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-hook-form-website ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 20, 2025 7:30am

Copy link

netlify bot commented Mar 20, 2025
edited
Loading

Deploy Preview for sage-cassata-31d224 ready!

Name Link
🔨 Latest commit 82565ec
🔍 Latest deploy log https://app.netlify.com/sites/sage-cassata-31d224/deploys/67dbc3ef869fb40008154f71
😎 Deploy Preview https://deploy-preview-1132--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 site configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

1 participant

AltStyle によって変換されたページ (->オリジナル) /