From c0d4169cf0eeb3e741e6f8545505e818cbe4140d Mon Sep 17 00:00:00 2001 From: Alex Andreev Date: Tue, 25 Aug 2020 16:40:58 +0300 Subject: [PATCH] Updating Chart on every componentDidUpdate Signed-off-by: Alex Andreev --- src/renderer/components/chart/chart.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/renderer/components/chart/chart.tsx b/src/renderer/components/chart/chart.tsx index 92e3619031..a5fa4b9706 100644 --- a/src/renderer/components/chart/chart.tsx +++ b/src/renderer/components/chart/chart.tsx @@ -63,14 +63,14 @@ export class Chart extends React.Component { this.renderChart() } - componentDidUpdate(prevProps: ChartProps) { - const { data, showChart, redraw } = this.props + componentDidUpdate() { + const { showChart, redraw } = this.props if (redraw) { this.chart.destroy() this.renderChart() return } - if (!isEqual(prevProps.data, data) && showChart) { + if (showChart) { if (!this.chart) this.renderChart() else this.updateChart() }