From ca094a9856435166ff9211342a984c5a09fabfe3 Mon Sep 17 00:00:00 2001 From: katherinehhh Date: Wed, 16 Oct 2024 15:57:04 +0800 Subject: [PATCH] refactor: support third party data souce --- .../client/component/CollectionsManager/AddFieldAction.tsx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/CollectionsManager/AddFieldAction.tsx b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/CollectionsManager/AddFieldAction.tsx index 9153c5fe89..878982d901 100644 --- a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/CollectionsManager/AddFieldAction.tsx +++ b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/CollectionsManager/AddFieldAction.tsx @@ -229,7 +229,14 @@ const AddFieldAction = (props) => { const { availableFieldInterfaces } = getTemplate(record.template) || {}; const { exclude, include } = availableFieldInterfaces || {}; const optionArr = []; + fieldOptions.forEach((v) => { + if (v.children.find((h) => h.allowExternalCreation)) { + optionArr.push({ + ...v, + children: v.children.filter((h) => h.allowExternalCreation), + }); + } if (v.key === 'relation') { let children = []; if (include?.length) {