GraphNG: make sure we update when children changes (#37333) (#37521)

(cherry picked from commit e3fe4a2d11)

Co-authored-by: Oscar Kilhed <oscar.kilhed@grafana.com>
This commit is contained in:
Grot (@grafanabot)
2021-08-04 13:53:25 +02:00
committed by GitHub
co-authored by Oscar Kilhed
parent 0e5a6a62be
commit 9a89e0c157
@@ -97,15 +97,6 @@ export class UPlotChart extends React.Component<PlotProps, UPlotChartState> {
this.state.ctx.plot?.destroy();
}
shouldComponentUpdate(nextProps: PlotProps, nextState: UPlotChartState) {
return (
nextState.ctx !== this.state.ctx ||
!sameDims(this.props, nextProps) ||
!sameData(this.props, nextProps) ||
!sameConfig(this.props, nextProps)
);
}
componentDidUpdate(prevProps: PlotProps) {
let { ctx } = this.state;