Merge branch 'main' into feat/sendgrid-app

pull/5501/head
Leo Giovanetti 2022-11-16 11:13:12 -03:00
commit c6d2443478
3 changed files with 4 additions and 22 deletions

View File

@ -90,7 +90,7 @@ const SetupFormStep1 = (props: { setIsLoading: (val: boolean) => void }) => {
return (
<FormProvider {...formMethods}>
<form id="setup-step-1" name="setup-step-1" className="space-y-4" onSubmit={onSubmit}>
<form id="wizard-step-1" name="wizard-step-1" className="space-y-4" onSubmit={onSubmit}>
<div>
<Controller
name="username"

View File

@ -296,25 +296,7 @@ const PlainForm = <T extends FieldValues>(props: FormProps<T>, ref: Ref<HTMLForm
});
}}
{...passThrough}>
{
/* @see https://react-hook-form.com/advanced-usage/#SmartFormComponent */
React.Children.map(props.children, (child) => {
return typeof child !== "string" &&
typeof child !== "number" &&
typeof child !== "boolean" &&
child &&
"props" in child &&
child.props.name
? React.createElement(child.type, {
...{
...child.props,
register: form.register,
key: child.props.name,
},
})
: child;
})
}
{props.children}
</form>
</FormProvider>
);

View File

@ -52,8 +52,8 @@ function WizardForm<T extends DefaultStep>(props: { href: string; steps: T[]; co
loading={currentStep.isLoading}
type="submit"
color="primary"
form={`setup-step-${step}`}
className="relative">
form={`wizard-step-${step}`}
className="relative ml-3">
{step < steps.length ? "Next" : "Finish"}
</Button>
</div>