react-hook-form 7.22.0 → 7.22.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1717,6 +1717,9 @@ function createFormControl(props = {}) {
1717
1717
  watchAll: false,
1718
1718
  focus: '',
1719
1719
  };
1720
+ _stateFlags.mount =
1721
+ !_proxyFormState.isValid || !!keepStateOptions.keepIsValid;
1722
+ _stateFlags.watch = !!props.shouldUnregister;
1720
1723
  _subjects.state.next({
1721
1724
  submitCount: keepStateOptions.keepSubmitCount
1722
1725
  ? _formState.submitCount
@@ -1743,9 +1746,6 @@ function createFormControl(props = {}) {
1743
1746
  isSubmitting: false,
1744
1747
  isSubmitSuccessful: false,
1745
1748
  });
1746
- _stateFlags.mount =
1747
- !_proxyFormState.isValid || !!keepStateOptions.keepIsValid;
1748
- _stateFlags.watch = !!props.shouldUnregister;
1749
1749
  };
1750
1750
  const setFocus = (name) => {
1751
1751
  const field = get(_fields, name)._f;