refactor(react): use array for nodeInternals, rename to nodes

This commit is contained in:
moklick
2023-06-12 16:56:02 +02:00
parent cefdfd4e70
commit c6501aff62
33 changed files with 146 additions and 197 deletions
@@ -78,7 +78,7 @@ export default (NodeComponent: ComponentType<NodeProps>) => {
}
if (onClick) {
const node = store.getState().nodeInternals.get(id)!;
const node = store.getState().nodes.find((n) => n.id === id)!;
onClick(event, { ...node });
}
};