2021-10-12 01:54:51 +02:00

26 lines
412 B
JavaScript

import React from "react";
class Network extends React.Component{
constructor(optionName, graph){
super()
this.optionName = optionName;
this.graph = graph;
}
//override default name getter
get name(){
return this.optionName;
}
getGraph() {
return this.graph;
}
componentDidMount() {
//update state on select
this.props.updateGraphObject(this);
}
}
export default Network;