feat(rg): add onConnect callback
This commit is contained in:
@@ -27,7 +27,8 @@ class ReactGraph extends PureComponent {
|
||||
render() {
|
||||
const {
|
||||
style, onElementClick, children, onLoad,
|
||||
onMove, onChange, elements, onElementsRemove
|
||||
onMove, onChange, elements, onElementsRemove,
|
||||
onConnect
|
||||
} = this.props;
|
||||
|
||||
const { nodes, edges } = elements
|
||||
@@ -41,6 +42,8 @@ class ReactGraph extends PureComponent {
|
||||
onLoad={onLoad}
|
||||
onMove={onMove}
|
||||
onChange={onChange}
|
||||
onElementClick={onElementClick}
|
||||
onConnect={onConnect}
|
||||
nodeTypes={this.nodeTypes}
|
||||
edgeTypes={this.edgeTypes}
|
||||
/>
|
||||
@@ -57,6 +60,7 @@ class ReactGraph extends PureComponent {
|
||||
ReactGraph.defaultProps = {
|
||||
onElementClick: () => {},
|
||||
onElementsRemove: () => {},
|
||||
onConnect: () => {},
|
||||
onLoad: () => {},
|
||||
onMove: () => {},
|
||||
onChange: () => {},
|
||||
|
||||
Reference in New Issue
Block a user