From 345080f92ec839817e8140dd2e8016d360c6558d Mon Sep 17 00:00:00 2001 From: chenos Date: Thu, 10 Mar 2022 12:01:30 +0800 Subject: [PATCH] fix(client): collection field does not exist --- .../antd/form-item/FormItem.tsx | 156 +++++++++--------- 1 file changed, 79 insertions(+), 77 deletions(-) diff --git a/packages/client/src/schema-component/antd/form-item/FormItem.tsx b/packages/client/src/schema-component/antd/form-item/FormItem.tsx index 9b3f35fa5..04285abb8 100644 --- a/packages/client/src/schema-component/antd/form-item/FormItem.tsx +++ b/packages/client/src/schema-component/antd/form-item/FormItem.tsx @@ -25,7 +25,7 @@ FormItem.Designer = () => { const compile = useCompile(); const collectionField = getField(fieldSchema['name']); const originalTitle = collectionField?.uiSchema?.title; - const targetFields = collectionField.target ? getCollectionFields(collectionField.target) : []; + const targetFields = collectionField?.target ? getCollectionFields(collectionField.target) : []; const initialValue = { title: field.title === originalTitle ? undefined : field.title, }; @@ -40,93 +40,95 @@ FormItem.Designer = () => { })); return ( - + } as ISchema + } + /> + )} {collectionField?.target && ( { }} /> )} - + {collectionField && }