feat(nodes): add helper functions to iterate over child nodes

This commit is contained in:
Christopher Möller
2021-10-21 11:53:44 +02:00
parent 9350884836
commit 9ad894d2df
7 changed files with 157 additions and 96 deletions
+2 -2
View File
@@ -14,7 +14,7 @@ import {
HandleType,
ReactFlowState,
} from '../../types';
import { flattenNodes } from '../../utils/graph';
import { nodeHelper } from '../../utils/nodes';
interface ConnectionLineProps {
connectionNodeId: ElementId;
@@ -29,7 +29,7 @@ interface ConnectionLineProps {
CustomConnectionLineComponent?: ConnectionLineComponent;
}
const nodesSelector = (s: ReactFlowState) => flattenNodes(s.nodes);
const nodesSelector = (s: ReactFlowState) => nodeHelper(s.nodes).flatten();
export default ({
connectionNodeId,