Skip to content

Commit

Permalink
Merge pull request #324 from kalbert312/fix-base-chart
Browse files Browse the repository at this point in the history
[React] Fix componentDidUpdate to use current props.
  • Loading branch information
zvonimirfras authored Aug 22, 2019
2 parents c4bbf3f + 853f089 commit faf6787
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions packages/react/src/base-chart.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@ export default class BaseChart extends React.Component {
Object.assign(this, this.chart);
}

componentDidUpdate(newProps) {
const { data } = newProps;

this.chart.setData(data);
componentDidUpdate() {
this.chart.setData(this.props.data);
}
}

0 comments on commit faf6787

Please sign in to comment.