[Bug]: Regression bug generated by releases v7.15.3 (Form Reset)

Open
#107 6 comments 0 reactions 1 assignee View on GitHub

@bluebill1049 is already working on this.

Since Sep 18, 2021.

Assessment

This issue has not been assessed yet.

Description

Version Number

7.15.3

Codesandbox/Expo snack

https://codesandbox.io/s/eloquent-breeze-gywwy?file=/src/Form.tsx

Steps to reproduce

Scenario 1

  1. Enter any string in the first name field
  2. Click on the reset button
  3. Enter any string in the last name field
  4. Check the dev tool
    Actual: you should find both first & last names fields isDirty equals tor true

Scenario 2

  1. Enter any string in the first name field
  2. Enter any string in the last name field
  3. Click on the Save button (note that I reset the form with newly saved data after save)
  4. Change the value in the first name field
  5. Check the dev tool
    Actual: you should find both fields has isDirty as false
Expected behaviour

Scenario 1
Expected: you should find only the last name field isDirty equals tor true

Scenario 2
Expected: you should find the first name field isDirty equals tor true

What browsers are you seeing the problem on?

Chrome

Relevant log output

No response

Code of Conduct
  • I agree to follow this project's Code of Conduct
Dominant language
TypeScript
Stars
670
Forks
55
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from react-hook-form/devtools

All issues in react-hook-form/devtools

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.