@wix/form-public 0.553.0 → 0.554.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.cjs +3 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -51161,7 +51161,9 @@ var useSubmit = ({ validateAndScrollToError, submitAction, onSubmit, onSubmitSuc
|
|
|
51161
51161
|
]);
|
|
51162
51162
|
const submitForm = useCallback(async () => {
|
|
51163
51163
|
const errors = await validateAndScrollToError(values);
|
|
51164
|
-
onSubmit?.()
|
|
51164
|
+
if (onSubmit?.() === false) {
|
|
51165
|
+
return;
|
|
51166
|
+
}
|
|
51165
51167
|
reportSubmitFormBi({
|
|
51166
51168
|
status: BiFormSubmissionStatus.INIT
|
|
51167
51169
|
});
|