@aatulwork/customform-renderer 1.7.0 → 1.9.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 +5 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1608,14 +1608,17 @@ var FormRenderer = ({
|
|
|
1608
1608
|
if (onSubmit) {
|
|
1609
1609
|
try {
|
|
1610
1610
|
await onSubmit(transformedData);
|
|
1611
|
-
|
|
1612
|
-
reset(
|
|
1611
|
+
const resetValues = initialValues || {};
|
|
1612
|
+
reset(resetValues, {
|
|
1613
1613
|
keepErrors: false,
|
|
1614
1614
|
keepDirty: false,
|
|
1615
1615
|
keepTouched: false,
|
|
1616
1616
|
keepIsSubmitted: false,
|
|
1617
1617
|
keepSubmitCount: false
|
|
1618
1618
|
});
|
|
1619
|
+
setTimeout(() => {
|
|
1620
|
+
clearErrors();
|
|
1621
|
+
}, 0);
|
|
1619
1622
|
if (onSuccess) onSuccess();
|
|
1620
1623
|
} catch (error) {
|
|
1621
1624
|
console.error("Form submission error:", error);
|