feat(rfInstance): add getElements function #274
This commit is contained in:
@@ -3,7 +3,11 @@ import React, { useState } from 'react';
|
||||
import ReactFlow, { removeElements, addEdge, MiniMap, isNode, Controls, Background } from 'react-flow-renderer';
|
||||
import { getElements } from './utils';
|
||||
|
||||
const onLoad = reactFlowInstance => reactFlowInstance.fitView();
|
||||
const onLoad = reactFlowInstance => {
|
||||
reactFlowInstance.fitView();
|
||||
|
||||
console.log(reactFlowInstance.getElements());
|
||||
}
|
||||
|
||||
const initialElements = getElements(10, 10);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user