From 1b3b07f0294b175f64db5ad599d9dc0073fcecf5 Mon Sep 17 00:00:00 2001 From: katherinehhh Date: Sat, 7 Oct 2023 21:42:16 +0800 Subject: [PATCH] fix(graph-collection-manager):graph collection cannot open edit modal (#2759) * style: graph collection stye improve * fix(graph-collection): graph collection cantnot open edit modal --- .../src/client/GraphDrawPage.tsx | 2 +- .../src/client/components/Entity.tsx | 2 +- .../plugin-graph-collection-manager/src/client/style.tsx | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/GraphDrawPage.tsx b/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/GraphDrawPage.tsx index 3ffd02cef..5828fad6e 100644 --- a/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/GraphDrawPage.tsx +++ b/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/GraphDrawPage.tsx @@ -613,7 +613,7 @@ export const GraphDrawPage = React.memo(() => { }); }; const handleConnectionAssociation = ({ target, through }) => { - const data = targetGraph.selectedCollections.split(',') || []; + const data = targetGraph.selectedCollections?.split(',') || []; data.push(target); through && data.push(through); const queryString = uniq(data).toString(); diff --git a/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/components/Entity.tsx b/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/components/Entity.tsx index 3756318ac..22d9a0d5d 100644 --- a/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/components/Entity.tsx +++ b/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/components/Entity.tsx @@ -442,7 +442,7 @@ const Entity: React.FC<{ }} schema={{ type: 'object', - name: uid(), + name: node.id, properties: { connectParent: { type: 'void', diff --git a/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/style.tsx b/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/style.tsx index b99bbaef8..cef2e842f 100644 --- a/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/style.tsx +++ b/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/style.tsx @@ -163,6 +163,9 @@ const useStyles = createStyles(({ token, css }) => { overflow: hidden; margin-left: 8px; min-width: 50%; + .ant-badge { + padding-right: 5px; + } } .type {