fix(setNodes): use correct index when using setNodes for inserting #4455

This commit is contained in:
moklick
2024-08-28 16:17:03 +02:00
parent 7b8fe28b37
commit e02e3703c1
3 changed files with 26 additions and 3 deletions
+2
View File
@@ -32,6 +32,7 @@ export type NodeRemoveChange = {
export type NodeAddChange<NodeType extends NodeBase = NodeBase> = {
item: NodeType;
type: 'add';
index?: number;
};
export type NodeReplaceChange<NodeType extends NodeBase = NodeBase> = {
@@ -57,6 +58,7 @@ export type EdgeRemoveChange = NodeRemoveChange;
export type EdgeAddChange<EdgeType extends EdgeBase = EdgeBase> = {
item: EdgeType;
type: 'add';
index?: number;
};
export type EdgeReplaceChange<EdgeType extends EdgeBase = EdgeBase> = {