fix(edges): add type property to EdgeProps

This commit is contained in:
Ze-Zheng Wu
2025-10-01 18:21:14 +08:00
parent 4c2a303057
commit fe2a45ed2a
2 changed files with 6 additions and 1 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@xyflow/react': patch
---
Add `type` property to `EdgeProps` to match `NodeProps` behavior
+1 -1
View File
@@ -149,7 +149,7 @@ export type EdgeTextProps = Omit<SVGAttributes<SVGElement>, 'x' | 'y'> &
*/ */
export type EdgeProps<EdgeType extends Edge = Edge> = Pick< export type EdgeProps<EdgeType extends Edge = Edge> = Pick<
EdgeType, EdgeType,
'id' | 'animated' | 'data' | 'style' | 'selected' | 'source' | 'target' | 'selectable' | 'deletable' 'id' | 'type' | 'animated' | 'data' | 'style' | 'selected' | 'source' | 'target' | 'selectable' | 'deletable'
> & > &
EdgePosition & EdgePosition &
EdgeLabelOptions & { EdgeLabelOptions & {