@aatulwork/customform-renderer 1.6.0 → 1.7.0
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.js +9 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1608,11 +1608,15 @@ var FormRenderer = ({
|
|
|
1608
1608
|
if (onSubmit) {
|
|
1609
1609
|
try {
|
|
1610
1610
|
await onSubmit(transformedData);
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1611
|
+
clearErrors();
|
|
1612
|
+
reset(initialValues || {}, {
|
|
1613
|
+
keepErrors: false,
|
|
1614
|
+
keepDirty: false,
|
|
1615
|
+
keepTouched: false,
|
|
1616
|
+
keepIsSubmitted: false,
|
|
1617
|
+
keepSubmitCount: false
|
|
1618
|
+
});
|
|
1619
|
+
if (onSuccess) onSuccess();
|
|
1616
1620
|
} catch (error) {
|
|
1617
1621
|
console.error("Form submission error:", error);
|
|
1618
1622
|
let errorMessage = "Form submission failed. Please try again.";
|