react-hook-form 7.45.2 → 7.45.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.
@@ -568,7 +568,7 @@ function Form(props) {
568
568
  formData.append(name, get(data, name));
569
569
  }
570
570
  if (onSubmit) {
571
- onSubmit({
571
+ await onSubmit({
572
572
  data,
573
573
  event,
574
574
  method,
@@ -1230,6 +1230,7 @@ function useFieldArray(props) {
1230
1230
  focusFieldBy(control._fields, (key) => !!key && key.startsWith(control._names.focus || ''));
1231
1231
  control._names.focus = '';
1232
1232
  control._updateValid();
1233
+ _actioned.current = false;
1233
1234
  }, [fields, name, control]);
1234
1235
  React.useEffect(() => {
1235
1236
  !get(control._formValues, name) && control._updateFieldArray(name);
@@ -2030,9 +2031,6 @@ function createFormControl(props = {}, flushRootRender) {
2030
2031
  },
2031
2032
  });
2032
2033
  _names.mount.add(name);
2033
- if (!isUndefined(options.value)) {
2034
- set(_formValues, name, options.value);
2035
- }
2036
2034
  field
2037
2035
  ? disabledIsDefined &&
2038
2036
  set(_formValues, name, options.disabled