fix(edges): add type property to EdgeProps

This commit is contained in:
Ze-Zheng Wu
2025-09-28 17:35:03 +08:00
parent 4c2a303057
commit fe2a45ed2a
2 changed files with 6 additions and 1 deletions

View File

@@ -0,0 +1,5 @@
---
'@xyflow/react': patch
---
Add `type` property to `EdgeProps` to match `NodeProps` behavior

View File

@@ -149,7 +149,7 @@ export type EdgeTextProps = Omit<SVGAttributes<SVGElement>, 'x' | 'y'> &
*/
export type EdgeProps<EdgeType extends Edge = Edge> = Pick<
EdgeType,
'id' | 'animated' | 'data' | 'style' | 'selected' | 'source' | 'target' | 'selectable' | 'deletable'
'id' | 'type' | 'animated' | 'data' | 'style' | 'selected' | 'source' | 'target' | 'selectable' | 'deletable'
> &
EdgePosition &
EdgeLabelOptions & {