From 4a7e44f686828fb3cc2cb7cd8605956d0d1299e5 Mon Sep 17 00:00:00 2001 From: katherinehhh Date: Tue, 25 Jul 2023 09:23:32 +0800 Subject: [PATCH] fix: table column field undefined fix (#2311) --- .../antd/table-v2/components/ColumnFieldProvider.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/client/src/schema-component/antd/table-v2/components/ColumnFieldProvider.tsx b/packages/core/client/src/schema-component/antd/table-v2/components/ColumnFieldProvider.tsx index 727127112..d84d62d40 100644 --- a/packages/core/client/src/schema-component/antd/table-v2/components/ColumnFieldProvider.tsx +++ b/packages/core/client/src/schema-component/antd/table-v2/components/ColumnFieldProvider.tsx @@ -14,7 +14,7 @@ export const ColumnFieldProvider = observer( return buf; }, null); const collectionField = fieldSchema && getCollectionJoinField(fieldSchema['x-collection-field']); - if (fieldSchema && record?.__collection && ['select', 'multipleSelect'].includes(collectionField.interface)) { + if (fieldSchema && record?.__collection && ['select', 'multipleSelect'].includes(collectionField?.interface)) { const fieldName = `${record.__collection}.${fieldSchema.name}`; schema.properties[fieldSchema.name]['x-collection-field'] = fieldName; return ;