Skip to content

Commit

Permalink
feat: export FormList interface (#25849)
Browse files Browse the repository at this point in the history
close #24487
close #25835
  • Loading branch information
afc163 committed Jul 28, 2020
1 parent f0509f0 commit cffa9af
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions components/form/FormList.tsx
Expand Up @@ -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<FormListProps> = ({ children, ...props }) => {
Expand Down

0 comments on commit cffa9af

Please sign in to comment.