Merge pull request #5353 from aidanbarrett/fix/onreconnectend-missing-parameter

Add missing FinalConnectionState parameter to onReconnectEnd prop types
This commit is contained in:
Moritz Klack
2025-06-23 11:51:32 +02:00
committed by GitHub
2 changed files with 7 additions and 1 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@xyflow/react': patch
---
Add missing `FinalConnectionState` parameter to `onReconnectEnd` prop types
+2 -1
View File
@@ -22,6 +22,7 @@ import type {
SnapGrid,
OnReconnect,
AriaLabelConfig,
FinalConnectionState,
} from '@xyflow/system';
import type {
@@ -138,7 +139,7 @@ export interface ReactFlowProps<NodeType extends Node = Node, EdgeType extends E
* This event fires when the user releases the source or target of an editable edge. It is called
* even if an edge update does not occur.
*/
onReconnectEnd?: (event: MouseEvent | TouchEvent, edge: EdgeType, handleType: HandleType) => void;
onReconnectEnd?: (event: MouseEvent | TouchEvent, edge: EdgeType, handleType: HandleType, connectionState: FinalConnectionState) => void;
/**
* Use this event handler to add interactivity to a controlled flow.
* It is called on node drag, select, and move.