feature: loading completed with teste
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user