From cd76ae7e63c2e6755e4190bbf6ac0f74ca403044 Mon Sep 17 00:00:00 2001 From: katherinehhh Date: Thu, 16 Nov 2023 18:15:10 +0800 Subject: [PATCH] fix: tableoid should pointed to target collection in assciation field data scope config (#3053) --- .../antd/collection-select/CollectionSelect.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/client/src/schema-component/antd/collection-select/CollectionSelect.tsx b/packages/core/client/src/schema-component/antd/collection-select/CollectionSelect.tsx index 5e2384846e..0eaa564ee0 100644 --- a/packages/core/client/src/schema-component/antd/collection-select/CollectionSelect.tsx +++ b/packages/core/client/src/schema-component/antd/collection-select/CollectionSelect.tsx @@ -17,7 +17,7 @@ function useOptions({ filter, isTableOid }: CollectionSelectProps) { const field: any = useField(); const ctx: any = useContext(FilterContext); const collection = useCollection(); - const targetCollection = isTableOid && (ctx?.field?.collectionName || collection.name); + const targetCollection = isTableOid && (ctx?.field?.collectionName || ctx.collectionName || collection.name); const inheritCollections = useSelfAndChildrenCollections(targetCollection); const { collections = [] } = useCollectionManager(); const currentCollections = field?.dataSource