@trackunit/react-form-wizard 1.21.10 → 1.21.11
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/index.cjs.js +5 -1
- package/index.esm.js +5 -1
- package/package.json +1 -1
package/index.cjs.js
CHANGED
|
@@ -319,7 +319,11 @@ const FormWizardStepWrapper = ({ stepKey, onCancel, description, title, componen
|
|
|
319
319
|
document.removeEventListener("keydown", handleKeyDown);
|
|
320
320
|
};
|
|
321
321
|
}, [stepSubmitHandler]);
|
|
322
|
-
return (jsxRuntime.jsxs("form", { className: cvaFormWizardComponentStepForm(), noValidate: true,
|
|
322
|
+
return (jsxRuntime.jsxs("form", { className: cvaFormWizardComponentStepForm(), noValidate: true, onKeyDown: e => {
|
|
323
|
+
if (e.key === "Enter" && e.target instanceof HTMLInputElement) {
|
|
324
|
+
e.preventDefault();
|
|
325
|
+
}
|
|
326
|
+
}, onSubmit: async (e) => {
|
|
323
327
|
e.preventDefault();
|
|
324
328
|
try {
|
|
325
329
|
await onPrimaryAction?.(form);
|
package/index.esm.js
CHANGED
|
@@ -317,7 +317,11 @@ const FormWizardStepWrapper = ({ stepKey, onCancel, description, title, componen
|
|
|
317
317
|
document.removeEventListener("keydown", handleKeyDown);
|
|
318
318
|
};
|
|
319
319
|
}, [stepSubmitHandler]);
|
|
320
|
-
return (jsxs("form", { className: cvaFormWizardComponentStepForm(), noValidate: true,
|
|
320
|
+
return (jsxs("form", { className: cvaFormWizardComponentStepForm(), noValidate: true, onKeyDown: e => {
|
|
321
|
+
if (e.key === "Enter" && e.target instanceof HTMLInputElement) {
|
|
322
|
+
e.preventDefault();
|
|
323
|
+
}
|
|
324
|
+
}, onSubmit: async (e) => {
|
|
321
325
|
e.preventDefault();
|
|
322
326
|
try {
|
|
323
327
|
await onPrimaryAction?.(form);
|