From 2cfe4d7af7dc484c3d6d2d102d9139c0732254e8 Mon Sep 17 00:00:00 2001 From: Katherine Date: Tue, 4 Mar 2025 16:48:09 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20association=20block=20not=20rendering=20?= =?UTF-8?q?in=20popup=20within=20collection=20inher=E2=80=A6=20(#6303)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: association block not rendering in popup within collection inheritance * fix: bug * Merge main into F-1713 --- .../client/src/block-provider/DetailsBlockProvider.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/core/client/src/block-provider/DetailsBlockProvider.tsx b/packages/core/client/src/block-provider/DetailsBlockProvider.tsx index 69d9a50cf6..624879ef94 100644 --- a/packages/core/client/src/block-provider/DetailsBlockProvider.tsx +++ b/packages/core/client/src/block-provider/DetailsBlockProvider.tsx @@ -103,14 +103,14 @@ const useCompatDetailsBlockParams = (props) => { export const DetailsBlockProvider = withDynamicSchemaProps((props) => { const { params, parseVariableLoading } = useCompatDetailsBlockParams(props); const record = useCollectionRecordData(); - const { association, dataSource } = props; + const { association, dataSource, action } = props; const { getCollection } = useCollectionManager_deprecated(dataSource); const { __collection } = record || {}; const { designable } = useDesignable(); - const collection = props.collection || getCollection(association, dataSource).name; + const collectionName = props.collection; let detailFlag = true; - if (!designable && __collection) { - detailFlag = __collection === collection; + if (!designable && __collection && action === 'get' && !association) { + detailFlag = __collection === collectionName; } const refresh = useUpdate();