Function createCreateUpdateProductForTenantDefaultFormView
- createCreateUpdateProductForTenantDefaultFormView<TFormCustomFields>(options?): FunctionComponent<{
attachmentUploadState: undefined | {
percentage?: number;
type: "uploadSingleFile";
} | {
type: "completeDisplayImage";
url: string;
};
attributeItemGroups: CreateProductFormItemGroup[];
blockProps: BlockComponentProps;
categories?: {
id: string;
name: string;
}[];
isLoading: boolean;
isSubmitting: boolean;
onDropAttachment: ((file) => Promise<void>);
onRequestAttachmentDelete: (() => void);
onSubmit: ((formData) => Promise<unknown>);
productDefaultValues?: Partial<CreateProductFormData<TFormCustomFields>>;
}> Returns FunctionComponent<{
attachmentUploadState: undefined | {
percentage?: number;
type: "uploadSingleFile";
} | {
type: "completeDisplayImage";
url: string;
};
attributeItemGroups: CreateProductFormItemGroup[];
blockProps: BlockComponentProps;
categories?: {
id: string;
name: string;
}[];
isLoading: boolean;
isSubmitting: boolean;
onDropAttachment: ((file) => Promise<void>);
onRequestAttachmentDelete: (() => void);
onSubmit: ((formData) => Promise<unknown>);
productDefaultValues?: Partial<CreateProductFormData<TFormCustomFields>>;
}>
Default Form View for the CreateProductForTenant block. By default, no custom fields are used.
This form will display a success modal after the form is submitted. Call
onComplete
to navigate to the success route.