From 7687ff2c907ee5ab262ee08240bc932b6112b1ae Mon Sep 17 00:00:00 2001 From: HyperLifelll9 Date: Tue, 25 Jun 2024 07:08:06 +0800 Subject: [PATCH] fix(module:graph): fix @for track function (#8587) --- components/graph/graph.component.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/graph/graph.component.ts b/components/graph/graph.component.ts index 4ed38169472..76b6c3e940b 100644 --- a/components/graph/graph.component.ts +++ b/components/graph/graph.component.ts @@ -90,7 +90,7 @@ export function isDataSource(value: NzSafeAny): value is NzGraphData { - @for (edge of $asNzGraphEdges(renderNode.edges); track edgeTrackByFun) { + @for (edge of $asNzGraphEdges(renderNode.edges); track edgeTrackByFun(edge)) { (); - edgeTrackByFun = (_: number, edge: NzGraphEdge): string => `${edge.v}-${edge.w}`; + edgeTrackByFun = (edge: NzGraphEdge): string => `${edge.v}-${edge.w}`; subGraphTransform = (node: NzGraphGroupNode): string => { const x = node.x - node.coreBox.width / 2.0;