From a751221916bd693a0b7c54f861320a97fdd53e37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A0=97=E5=98=89=E7=94=B7?= <574980606@qq.com> Date: Mon, 13 Jan 2025 09:08:26 +0800 Subject: [PATCH] fix: fix --- src/Form.tsx | 2 +- src/List.tsx | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/Form.tsx b/src/Form.tsx index 200282a7..a883397c 100644 --- a/src/Form.tsx +++ b/src/Form.tsx @@ -17,7 +17,7 @@ import ListContext from './ListContext'; type BaseFormProps = Omit, 'onSubmit' | 'children'>; -type RenderProps = (values: Store, form: FormInstance) => React.JSX.Element | React.ReactNode; +type RenderProps = (values: Store, form: FormInstance) => React.ReactNode; export interface FormProps extends BaseFormProps { initialValues?: Store; diff --git a/src/List.tsx b/src/List.tsx index 9a0e6ce6..7bb22d01 100644 --- a/src/List.tsx +++ b/src/List.tsx @@ -24,11 +24,7 @@ export interface ListProps { rules?: ValidatorRule[]; validateTrigger?: string | string[] | false; initialValue?: any[]; - children?: ( - fields: ListField[], - operations: ListOperations, - meta: Meta, - ) => React.JSX.Element | React.ReactNode; + children?: (fields: ListField[], operations: ListOperations, meta: Meta) => React.ReactNode; /** @private Passed by Form.List props. Do not use since it will break by path check. */ isListField?: boolean;