edges reordser fix

This commit is contained in:
2023-11-01 13:09:32 +02:00
parent 7ac59fc0fe
commit 1442b68503
4 changed files with 24 additions and 24 deletions
@@ -8,6 +8,7 @@ export function insertEdges(graph, sourceRecord, targetRecords, fieldName, actio
sourceSchema: sourceRecord.schema,
targetSchema: r.schema,
field: fieldName,
depth: 1,
rank: ""
};
});
@@ -18,6 +19,6 @@ export function insertEdges(graph, sourceRecord, targetRecords, fieldName, actio
}
graph.records = uniqBy([...graph.records, ...targetRecords], (r) => r.id);
graph.edges = uniqBy([...replacedEdges, ...newEdges], (edge) => edge.source + edge.target + edge.field);
graph.edges = uniqBy([...replacedEdges, ...newEdges], (edge) => edge.source + edge.target + edge.field + edge.depth);
return graph;
}