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

This commit is contained in:
Oscar Kilhed 2021-08-04 09:07:00 +02:00 committed by GitHub
parent 2e476167eb
commit e3fe4a2d11
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;