From cc27e9f7d9eb227ce5fbbc091ed2ec2f6f2d6bb2 Mon Sep 17 00:00:00 2001 From: Valentin Hervieu Date: Tue, 9 Feb 2021 19:24:18 +0100 Subject: [PATCH 1/2] [Typescript] Add missing classes prop on SimpleFormIterator In order to customise the layout of a form in SimpleFormIterator, I need to use the `classes` props. It works but the TS definition was not allowing it. This simply adds the `classes` prop. --- packages/ra-ui-materialui/src/form/SimpleFormIterator.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/ra-ui-materialui/src/form/SimpleFormIterator.tsx b/packages/ra-ui-materialui/src/form/SimpleFormIterator.tsx index d9406df9e60..915e0c3c68a 100644 --- a/packages/ra-ui-materialui/src/form/SimpleFormIterator.tsx +++ b/packages/ra-ui-materialui/src/form/SimpleFormIterator.tsx @@ -319,6 +319,7 @@ export interface SimpleFormIteratorProps extends Partial, 'meta'>> { addButton?: ReactElement; basePath?: string; + classes?: Partial>; className?: string; defaultValue?: any; disabled?: boolean; From eeed80f2e6da82753edc94420265dd9480367b85 Mon Sep 17 00:00:00 2001 From: Valentin Hervieu Date: Thu, 11 Feb 2021 13:59:43 +0100 Subject: [PATCH 2/2] Address review --- packages/ra-ui-materialui/src/form/SimpleFormIterator.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/ra-ui-materialui/src/form/SimpleFormIterator.tsx b/packages/ra-ui-materialui/src/form/SimpleFormIterator.tsx index 915e0c3c68a..1cce3872a7b 100644 --- a/packages/ra-ui-materialui/src/form/SimpleFormIterator.tsx +++ b/packages/ra-ui-materialui/src/form/SimpleFormIterator.tsx @@ -21,6 +21,7 @@ import classNames from 'classnames'; import { FieldArrayRenderProps } from 'react-final-form-arrays'; import FormInput from './FormInput'; +import { ClassesOverride } from '../types'; const useStyles = makeStyles( theme => ({ @@ -319,7 +320,7 @@ export interface SimpleFormIteratorProps extends Partial, 'meta'>> { addButton?: ReactElement; basePath?: string; - classes?: Partial>; + classes?: ClassesOverride; className?: string; defaultValue?: any; disabled?: boolean;