diff --git a/packages/ra-ui-materialui/src/form/SimpleForm.tsx b/packages/ra-ui-materialui/src/form/SimpleForm.tsx index 6f32ec4c12f..e44a06b5913 100644 --- a/packages/ra-ui-materialui/src/form/SimpleForm.tsx +++ b/packages/ra-ui-materialui/src/form/SimpleForm.tsx @@ -91,7 +91,7 @@ export interface SimpleFormProps basePath?: string; children: ReactNode; className?: string; - container?: React.ComponentType; + component?: React.ComponentType; initialValues?: any; margin?: 'none' | 'normal' | 'dense'; resource?: string; @@ -105,7 +105,7 @@ const SimpleFormView: FC = ({ basePath, children, className, - container: Container, + component: Component, handleSubmit, handleSubmitWithRedirect, invalid, @@ -125,7 +125,7 @@ const SimpleFormView: FC = ({ className={classnames('simple-form', className)} {...sanitizeRestProps(rest)} > - + {Children.map( children, (input: ReactElement) => @@ -140,7 +140,7 @@ const SimpleFormView: FC = ({ /> ) )} - + {toolbar && React.cloneElement(toolbar, { basePath, @@ -184,7 +184,7 @@ SimpleFormView.propTypes = { export interface SimpleFormViewProps extends FormRenderProps { basePath?: string; className?: string; - container?: React.ComponentType; + component?: React.ComponentType; margin?: 'none' | 'normal' | 'dense'; handleSubmitWithRedirect?: (redirectTo: RedirectionSideEffect) => void; record?: Record; @@ -202,7 +202,7 @@ export interface SimpleFormViewProps extends FormRenderProps { SimpleFormView.defaultProps = { submitOnEnter: true, toolbar: , - container: CardContentInner, + component: CardContentInner, }; const sanitizeRestProps = ({