Skip to content

Commit

Permalink
fix: check all props in shouldComponentUpdate
Browse files Browse the repository at this point in the history
  • Loading branch information
targos committed Apr 24, 2017
1 parent 10e5ab1 commit dacfde2
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/Hierarchy.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,16 @@ class Hierarchy extends Component {
}

shouldComponentUpdate(nextProps) {
return treeSelector(nextProps) !== this.computedTree;
return (
this.props.nodeRenderer !== nextProps.nodeRenderer ||
this.props.rootRenderer !== nextProps.rootRenderer ||
this.props.leafRenderer !== nextProps.leafRenderer ||
this.props.onNodeClick !== nextProps.onNodeClick ||
this.props.transition !== nextProps.transition ||
this.props.width !== nextProps.width ||
this.props.height !== nextProps.height ||
treeSelector(nextProps) !== this.computedTree
);
}

render() {
Expand Down

0 comments on commit dacfde2

Please sign in to comment.