feature: loading completed with teste

This commit is contained in:
2026-03-06 14:54:20 +01:00
parent 0af50e165a
commit 8bf3ab296d
2 changed files with 236 additions and 2 deletions

View File

@@ -43,11 +43,12 @@ export const useGraphLayersTreeStore = create<TreeStore>()((set) => ({
} else {
const nodesFlatById = new Map(state.nodesFlatById);
nodesFlatById.set(childNode.key, childNode);
const newRootNodes = [...state.rootNodes, childNode];
const newState = {
nodesFlatById: nodesFlatById,
parentIdByChildId: state.parentIdByChildId,
rootNodes: [...state.rootNodes, childNode],
tree: createTree([...state.rootNodes], nodesFlatById)
rootNodes: newRootNodes,
tree: createTree(newRootNodes, nodesFlatById)
}
return newState;
}