Merge pull request #1512 from SeonghoJin/added-dependency-of-onConnectEdge-and-onUpdateEdge

Fix when it disappears when connecting an edge to update to a new node
This commit is contained in:
Moritz Klack
2021-10-04 10:59:27 +02:00
committed by GitHub
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -160,7 +160,7 @@ export default (EdgeComponent: ComponentType<EdgeProps>) => {
_onEdgeUpdate _onEdgeUpdate
); );
}, },
[id, source, target, type, sourceHandleId, targetHandleId, setConnectionNodeId, setPosition, edgeElement] [id, source, target, type, sourceHandleId, targetHandleId, setConnectionNodeId, setPosition, edgeElement, onConnectEdge]
); );
const onEdgeUpdaterSourceMouseDown = useCallback( const onEdgeUpdaterSourceMouseDown = useCallback(
+1 -1
View File
@@ -72,7 +72,7 @@ const Edge = ({
(connection: Connection) => { (connection: Connection) => {
props.onEdgeUpdate?.(edge, connection); props.onEdgeUpdate?.(edge, connection);
}, },
[edge] [edge, props.onEdgeUpdate]
); );
if (!sourceNode) { if (!sourceNode) {