@trackunit/react-form-wizard 0.1.221 → 0.1.223
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 +7 -1
- package/index.esm.js +7 -1
- package/package.json +1 -1
package/index.cjs.js
CHANGED
|
@@ -541,13 +541,19 @@ const TestHelperFormWizardStep = ({ stepKey, fullFormSchema, defaultValues, chil
|
|
|
541
541
|
const form = reactHookForm.useForm({
|
|
542
542
|
resolver: zod.zodResolver(fullFormSchema.shape[stepKey]),
|
|
543
543
|
mode: "all",
|
|
544
|
+
defaultValues: defaultValues === null || defaultValues === void 0 ? void 0 : defaultValues[stepKey],
|
|
544
545
|
});
|
|
545
546
|
const fullForm = reactHookForm.useForm({
|
|
546
547
|
resolver: zod.zodResolver(fullFormSchema),
|
|
547
548
|
mode: "all",
|
|
548
549
|
defaultValues: defaultValues,
|
|
549
550
|
});
|
|
550
|
-
return jsxRuntime.jsx(reactHookForm.FormProvider, { ...form, children: jsxRuntime.jsx("div", { "data-testid": stepKey, children: children({
|
|
551
|
+
return (jsxRuntime.jsx(reactHookForm.FormProvider, { ...form, children: jsxRuntime.jsx("div", { "data-testid": stepKey, children: children({
|
|
552
|
+
form,
|
|
553
|
+
fullForm,
|
|
554
|
+
setSubmitHandler: () => { },
|
|
555
|
+
...overrides,
|
|
556
|
+
}) }) }));
|
|
551
557
|
};
|
|
552
558
|
|
|
553
559
|
/*
|
package/index.esm.js
CHANGED
|
@@ -539,13 +539,19 @@ const TestHelperFormWizardStep = ({ stepKey, fullFormSchema, defaultValues, chil
|
|
|
539
539
|
const form = useForm({
|
|
540
540
|
resolver: zodResolver(fullFormSchema.shape[stepKey]),
|
|
541
541
|
mode: "all",
|
|
542
|
+
defaultValues: defaultValues === null || defaultValues === void 0 ? void 0 : defaultValues[stepKey],
|
|
542
543
|
});
|
|
543
544
|
const fullForm = useForm({
|
|
544
545
|
resolver: zodResolver(fullFormSchema),
|
|
545
546
|
mode: "all",
|
|
546
547
|
defaultValues: defaultValues,
|
|
547
548
|
});
|
|
548
|
-
return jsx(FormProvider, { ...form, children: jsx("div", { "data-testid": stepKey, children: children({
|
|
549
|
+
return (jsx(FormProvider, { ...form, children: jsx("div", { "data-testid": stepKey, children: children({
|
|
550
|
+
form,
|
|
551
|
+
fullForm,
|
|
552
|
+
setSubmitHandler: () => { },
|
|
553
|
+
...overrides,
|
|
554
|
+
}) }) }));
|
|
549
555
|
};
|
|
550
556
|
|
|
551
557
|
/*
|