Unable to import GraphCanvasRef
angynk opened this issue · comments
Describe the bug
In my React JS project, I am unable to import GraphCanvasRef from reagraph. In console i see the following error: 'export 'GraphCanvasRef' (imported as 'GraphCanvasRef') was not found in 'reagraph':
import {React, useRef} from 'react';
import { GraphCanvas, useSelection,GraphCanvasRef} from 'reagraph';
import nodesData from '../assets/data/nodes.json';
import edgesData from '../assets/data/edges.json';
const KGexample = () => {
const nodes = nodesData;
const edges = edgesData;
const graphRef = useRef<GraphCanvasRef| null>(null);
const {
selections,
actives,
onNodeClick,
onCanvasClick
} = useSelection({
ref: graphRef,
nodes: nodesData,
edges: edgesData,
pathSelectionType: 'in'
});
return (
<>
<div className="content">
<GraphCanvas
ref={graphRef}
nodes={nodes}
edges={edges}
minNodeSize={15}
sizingType="attribute"
selections={selections}
actives={actives}
onCanvasClick={onCanvasClick}
onNodeClick={onNodeClick}
/>
</div>
</>
);
};
Steps to Reproduce the Bug or Issue
Just include the GraphCanvasRef in the imports
Expected behavior
It was expected to import the GraphCanvasRef
Screenshots or Videos
No response
Platform
- Reagraph Version: 4.15.4
Your Example Website or App
No response
Additional context
No response
I'm not able to reproduce this. Can you provide a example and reopen?