Skip to content

Commit

Permalink
Renamed container prop to component
Browse files Browse the repository at this point in the history
  • Loading branch information
asvarcas authored and djhi committed Jan 19, 2021
1 parent 9489e9f commit 6eaac66
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions packages/ra-ui-materialui/src/form/SimpleForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export interface SimpleFormProps
basePath?: string;
children: ReactNode;
className?: string;
container?: React.ComponentType<any>;
component?: React.ComponentType<any>;
initialValues?: any;
margin?: 'none' | 'normal' | 'dense';
resource?: string;
Expand All @@ -105,7 +105,7 @@ const SimpleFormView: FC<SimpleFormViewProps> = ({
basePath,
children,
className,
container: Container,
component: Component,
handleSubmit,
handleSubmitWithRedirect,
invalid,
Expand All @@ -125,7 +125,7 @@ const SimpleFormView: FC<SimpleFormViewProps> = ({
className={classnames('simple-form', className)}
{...sanitizeRestProps(rest)}
>
<Container>
<Component>
{Children.map(
children,
(input: ReactElement) =>
Expand All @@ -140,7 +140,7 @@ const SimpleFormView: FC<SimpleFormViewProps> = ({
/>
)
)}
</Container>
</Component>
{toolbar &&
React.cloneElement(toolbar, {
basePath,
Expand Down Expand Up @@ -184,7 +184,7 @@ SimpleFormView.propTypes = {
export interface SimpleFormViewProps extends FormRenderProps {
basePath?: string;
className?: string;
container?: React.ComponentType<any>;
component?: React.ComponentType<any>;
margin?: 'none' | 'normal' | 'dense';
handleSubmitWithRedirect?: (redirectTo: RedirectionSideEffect) => void;
record?: Record;
Expand All @@ -202,7 +202,7 @@ export interface SimpleFormViewProps extends FormRenderProps {
SimpleFormView.defaultProps = {
submitOnEnter: true,
toolbar: <Toolbar />,
container: CardContentInner,
component: CardContentInner,
};

const sanitizeRestProps = ({
Expand Down

0 comments on commit 6eaac66

Please sign in to comment.