Skip to content

Commit

Permalink
🐛 fix: edge id (#43)
Browse files Browse the repository at this point in the history
Co-authored-by: jiangchu <[email protected]>
  • Loading branch information
ModestFun and jiangchu authored Dec 5, 2023
1 parent 21a970c commit 64834fe
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/FlowView/helper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -165,15 +165,18 @@ export function getRenderEdges(edges: FlowViewEdge[]) {
sourceHandle,
targetHandle,
className,
data,
id = `${source}-${target}`,
} = edge;

return {
id: `${source}-${target}`,
id,
source,
target,
sourceHandle,
targetHandle,
type,
data,
animated,
label,
className: getEdgeClsFromSelectType(select) + ' ' + className,
Expand Down
1 change: 1 addition & 0 deletions src/constants.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ export interface FlowViewEdge {
label?: string;
type?: EdgeType | string;
className?: string;
data?: any;
}

export interface FlowViewProps {
Expand Down

0 comments on commit 64834fe

Please sign in to comment.