From eff3e72e4f93a8cc4734abb1c4e5303c435cc096 Mon Sep 17 00:00:00 2001 From: moretall Date: Mon, 13 Sep 2021 16:50:02 +0900 Subject: [PATCH] Fix when it disappears when connecting an edge to update to a new node --- src/components/Edges/wrapEdge.tsx | 2 +- src/container/EdgeRenderer/index.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/Edges/wrapEdge.tsx b/src/components/Edges/wrapEdge.tsx index 0538cf40..60384e74 100644 --- a/src/components/Edges/wrapEdge.tsx +++ b/src/components/Edges/wrapEdge.tsx @@ -160,7 +160,7 @@ export default (EdgeComponent: ComponentType) => { _onEdgeUpdate ); }, - [id, source, target, type, sourceHandleId, targetHandleId, setConnectionNodeId, setPosition, edgeElement] + [id, source, target, type, sourceHandleId, targetHandleId, setConnectionNodeId, setPosition, edgeElement, onConnectEdge] ); const onEdgeUpdaterSourceMouseDown = useCallback( diff --git a/src/container/EdgeRenderer/index.tsx b/src/container/EdgeRenderer/index.tsx index 098b4109..1fd7f766 100644 --- a/src/container/EdgeRenderer/index.tsx +++ b/src/container/EdgeRenderer/index.tsx @@ -72,7 +72,7 @@ const Edge = ({ (connection: Connection) => { props.onEdgeUpdate?.(edge, connection); }, - [edge] + [edge, props.onEdgeUpdate] ); if (!sourceNode) {