From af41be13a6ef4734a6c424c035c7baab98b8639f Mon Sep 17 00:00:00 2001 From: anovazzi1 Date: Mon, 10 Jul 2023 18:46:22 -0300 Subject: [PATCH] update template bug --- .../GenericNode/components/parameterComponent/index.tsx | 1 + src/frontend/src/util/reactflowUtils.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/frontend/src/CustomNodes/GenericNode/components/parameterComponent/index.tsx b/src/frontend/src/CustomNodes/GenericNode/components/parameterComponent/index.tsx index 3d931fbe2..8614a0685 100644 --- a/src/frontend/src/CustomNodes/GenericNode/components/parameterComponent/index.tsx +++ b/src/frontend/src/CustomNodes/GenericNode/components/parameterComponent/index.tsx @@ -302,6 +302,7 @@ export default function ParameterComponent({ field_name={name} setNodeClass={(nodeClass) => { data.node = nodeClass; + // cleanEdges({ flow: { edges: reactFlowInstance.getEdges(), nodes: reactFlowInstance.getNodes() }, updateEdge: (edge) => reactFlowInstance.setEdges(edge) }); }} nodeClass={data.node} disabled={disabled} diff --git a/src/frontend/src/util/reactflowUtils.ts b/src/frontend/src/util/reactflowUtils.ts index c6059b39a..e7d2dc381 100644 --- a/src/frontend/src/util/reactflowUtils.ts +++ b/src/frontend/src/util/reactflowUtils.ts @@ -6,7 +6,6 @@ export function cleanEdges({ updateEdge, }: cleanEdgesType) { let newEdges = _.cloneDeep(edges); - console.log("cleanEdges", newEdges); edges.forEach((edge) => { // check if the source and target node still exists const sourceNode = nodes.find((node) => node.id === edge.source); @@ -43,5 +42,6 @@ export function cleanEdges({ } } }); + console.log("cleanEdges", newEdges); updateEdge(newEdges); }