From 7b0c85d3ca69cbb2ad82e8f6d95ad77a0c24a463 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=9F=E8=B4=A4?= Date: Tue, 11 Oct 2022 15:51:51 +0800 Subject: [PATCH] fix(form): ProFormDependency support T close https://github.com/ant-design/pro-components/issues/6040 --- packages/form/src/components/Dependency/index.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/form/src/components/Dependency/index.tsx b/packages/form/src/components/Dependency/index.tsx index 5063bcfa92fb..fb0ec398fa64 100644 --- a/packages/form/src/components/Dependency/index.tsx +++ b/packages/form/src/components/Dependency/index.tsx @@ -13,21 +13,21 @@ declare type RenderChildren = ( form: ProFormInstance, ) => React.ReactNode; -export type ProFormDependencyProps = Omit< +export type ProFormDependencyProps> = Omit< FormItemProps, 'name' | 'noStyle' | 'children' | 'label' > & { name: NamePath[]; ignoreFormListField?: boolean; - children: RenderChildren; + children: RenderChildren; }; -const ProFormDependency: React.FC = ({ +const ProFormDependency = ({ name: names, children, ignoreFormListField, ...rest -}) => { +}: ProFormDependencyProps) => { const context = useContext(ProFormContext); // ProFromList 的 field,里面有name和key const formListField = useContext(FormListContext);