remix-validated-form 4.6.8 → 4.6.10

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.
package/dist/index.esm.js CHANGED
@@ -1550,7 +1550,8 @@ function ValidatedForm({
1550
1550
  const handleSubmit = async (e, target, nativeEvent) => {
1551
1551
  startSubmit();
1552
1552
  const submitter = nativeEvent.submitter;
1553
- const formDataToValidate = getDataFromForm(e.currentTarget);
1553
+ const formMethod = (submitter == null ? void 0 : submitter.formMethod) || method;
1554
+ const formDataToValidate = getDataFromForm(target);
1554
1555
  if (submitter == null ? void 0 : submitter.name) {
1555
1556
  formDataToValidate.append(submitter.name, submitter.value);
1556
1557
  }
@@ -1574,11 +1575,11 @@ function ValidatedForm({
1574
1575
  return;
1575
1576
  }
1576
1577
  if (fetcher)
1577
- fetcher.submit(submitter || e.currentTarget);
1578
+ fetcher.submit(submitter || target, { method: formMethod });
1578
1579
  else
1579
1580
  submit(submitter || target, {
1580
1581
  replace: replace2,
1581
- method: (submitter == null ? void 0 : submitter.formMethod) || method
1582
+ method: formMethod
1582
1583
  });
1583
1584
  }
1584
1585
  };