fix(onLoad): use project and getElements in combination with RFPovider closes #285

This commit is contained in:
moklick
2020-08-20 08:53:51 +02:00
parent 312a8e3fe2
commit de9a846fea
5 changed files with 34 additions and 9 deletions
+2
View File
@@ -6,6 +6,7 @@ import Sidebar from './Sidebar';
import './provider.css';
const onElementClick = (event, element) => console.log('click', element);
const onLoad = (reactFlowInstance) => console.log('flow loaded:', reactFlowInstance);
const initialElements = [
{ id: '1', type: 'input', data: { label: 'Node 1' }, position: { x: 250, y: 5 } },
@@ -31,6 +32,7 @@ const ProviderFlow = () => {
onElementClick={onElementClick}
onConnect={onConnect}
onElementsRemove={onElementsRemove}
onLoad={onLoad}
>
<Controls />
</ReactFlow>