From 5e73b0b9ab5d67fde8063dc88e2498b393c0153f Mon Sep 17 00:00:00 2001 From: anovazzi1 Date: Mon, 4 Mar 2024 11:43:23 -0300 Subject: [PATCH] Add scapeJSONParse function to update edge data --- .../src/pages/FlowPage/components/PageComponent/index.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/frontend/src/pages/FlowPage/components/PageComponent/index.tsx b/src/frontend/src/pages/FlowPage/components/PageComponent/index.tsx index cac8b8faa..155c7bc61 100644 --- a/src/frontend/src/pages/FlowPage/components/PageComponent/index.tsx +++ b/src/frontend/src/pages/FlowPage/components/PageComponent/index.tsx @@ -31,6 +31,7 @@ import { getNodeId, isValidConnection, reconnectEdges, + scapeJSONParse, validateSelection, } from "../../../../utils/reactflowUtils"; import { getRandomName, isWrappedWithClass } from "../../../../utils/utils"; @@ -320,6 +321,8 @@ export default function Page({ (oldEdge: Edge, newConnection: Connection) => { if (isValidConnection(newConnection, nodes, edges)) { edgeUpdateSuccessful.current = true; + oldEdge.data.targetHandle = scapeJSONParse(newConnection.targetHandle!); + oldEdge.data.sourceHandle = scapeJSONParse(newConnection.sourceHandle!); setEdges((els) => updateEdge(oldEdge, newConnection, els)); } },