From 5769925757029d22b4592c75164fa94f7f30fb2c Mon Sep 17 00:00:00 2001 From: chenos Date: Sun, 5 Mar 2023 07:51:22 +0800 Subject: [PATCH] fix: details block is not displayed --- .../core/client/src/block-provider/FormBlockProvider.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/core/client/src/block-provider/FormBlockProvider.tsx b/packages/core/client/src/block-provider/FormBlockProvider.tsx index f1d75779a..fccf9aba4 100644 --- a/packages/core/client/src/block-provider/FormBlockProvider.tsx +++ b/packages/core/client/src/block-provider/FormBlockProvider.tsx @@ -55,7 +55,10 @@ export const FormBlockProvider = (props) => { const { __collection } = record; const currentCollection = useCollection(); const { designable } = useDesignable(); - const detailFlag = (Object.keys(record).length > 0 && designable) || __collection === collection; + let detailFlag = true; + if (!designable && __collection) { + detailFlag = __collection === collection; + } const createFlag = (currentCollection.name === collection && !Object.keys(record).length) || !currentCollection.name; return ( (detailFlag || createFlag) && (