@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.cjs
CHANGED
|
@@ -51171,7 +51171,9 @@ var useSubmit = ({ validateAndScrollToError, submitAction, onSubmit, onSubmitSuc
|
|
|
51171
51171
|
]);
|
|
51172
51172
|
const submitForm = React172.useCallback(async () => {
|
|
51173
51173
|
const errors = await validateAndScrollToError(values);
|
|
51174
|
-
onSubmit?.()
|
|
51174
|
+
if (onSubmit?.() === false) {
|
|
51175
|
+
return;
|
|
51176
|
+
}
|
|
51175
51177
|
reportSubmitFormBi({
|
|
51176
51178
|
status: BiFormSubmissionStatus.INIT
|
|
51177
51179
|
});
|