Skip to content
This repository has been archived by the owner on Oct 10, 2023. It is now read-only.

Commit

Permalink
Fixed bug with selectedNodes
Browse files Browse the repository at this point in the history
  • Loading branch information
Olga Belyaeva committed Feb 1, 2017
1 parent ae2f106 commit ebd7d20
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/GraphWorkspace.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ export default class GraphWorkspace extends React.PureComponent {
},
};

componentDidUpdate(prevProps, prevState) {
if (this.props.graph != prevProps.graph) {
this.setState({selectedNodes:[]})
componentWillReceiveProps(nextProps) {
if (nextProps.graph !== this.props.graph) {
this.setState({selectedNodes:[]});
}
}

Expand Down

0 comments on commit ebd7d20

Please sign in to comment.