feat(nested-nodes): change data structure to flat array of nodes

This commit is contained in:
Christopher Möller
2021-10-21 15:39:27 +02:00
parent 64239fbb51
commit 2252ea11ae
8 changed files with 64 additions and 205 deletions
+1 -3
View File
@@ -14,8 +14,6 @@ import {
HandleType,
ReactFlowState,
} from '../../types';
import { nodeHelper } from '../../utils/nodes';
interface ConnectionLineProps {
connectionNodeId: ElementId;
connectionHandleId: ElementId | null;
@@ -29,7 +27,7 @@ interface ConnectionLineProps {
CustomConnectionLineComponent?: ConnectionLineComponent;
}
const nodesSelector = (s: ReactFlowState) => nodeHelper(s.nodes).flatten();
const nodesSelector = (s: ReactFlowState) => s.nodes;
export default ({
connectionNodeId,