diff --git a/components/form/FormList.tsx b/components/form/FormList.tsx index d6375d9e1d10..3be508d469b1 100644 --- a/components/form/FormList.tsx +++ b/components/form/FormList.tsx @@ -3,21 +3,21 @@ import { List } from 'rc-field-form'; import { StoreValue } from 'rc-field-form/lib/interface'; import devWarning from '../_util/devWarning'; -interface FieldData { +export interface FormListFieldData { name: number; key: number; fieldKey: number; } -interface Operation { +export interface FormListOperation { add: (defaultValue?: StoreValue) => void; remove: (index: number | number[]) => void; move: (from: number, to: number) => void; } -interface FormListProps { +export interface FormListProps { name: string | number | (string | number)[]; - children: (fields: FieldData[], operation: Operation) => React.ReactNode; + children: (fields: FormListFieldData[], operation: FormListOperation) => React.ReactNode; } const FormList: React.FC = ({ children, ...props }) => {