react-hook-form 7.51.2 → 7.51.4

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.
@@ -1906,6 +1906,7 @@ function createFormControl(props = {}) {
1906
1906
  });
1907
1907
  };
1908
1908
  const onChange = async (event) => {
1909
+ _state.mount = true;
1909
1910
  const target = event.target;
1910
1911
  let name = target.name;
1911
1912
  let isFieldValueUpdated = true;
@@ -2024,8 +2025,7 @@ function createFormControl(props = {}) {
2024
2025
  };
2025
2026
  const getValues = (fieldNames) => {
2026
2027
  const values = {
2027
- ..._defaultValues,
2028
- ...(_state.mount ? _formValues : {}),
2028
+ ...(_state.mount ? _formValues : _defaultValues),
2029
2029
  };
2030
2030
  return isUndefined(fieldNames)
2031
2031
  ? values