From ac3d6d91b7ad92a3f660ecffa769621c0d8ab53a Mon Sep 17 00:00:00 2001 From: Zeke Zhang <958414905@qq.com> Date: Thu, 25 Jul 2024 10:50:22 +0800 Subject: [PATCH] fix: prevent URL change on clicking unconfigured association field (#4919) --- .../antd/association-field/InternalViewer.tsx | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/packages/core/client/src/schema-component/antd/association-field/InternalViewer.tsx b/packages/core/client/src/schema-component/antd/association-field/InternalViewer.tsx index 153e4b8f8e..7210190994 100644 --- a/packages/core/client/src/schema-component/antd/association-field/InternalViewer.tsx +++ b/packages/core/client/src/schema-component/antd/association-field/InternalViewer.tsx @@ -98,10 +98,15 @@ const ButtonLinkList: FC = (props) => { if (designable) { insertViewer(schema.Viewer); } - openPopup({ - recordData: record, - parentRecordData: recordData, - }); + + // fix https://nocobase.height.app/T-4794/description + if (fieldSchema.properties) { + openPopup({ + recordData: record, + parentRecordData: recordData, + }); + } + ellipsisWithTooltipRef?.current?.setPopoverVisible(false); }} >