From 02ad9a38cc5f34bf12c3000c1e6b93e79a7b07e4 Mon Sep 17 00:00:00 2001 From: AlessandroVetere Date: Thu, 18 Apr 2019 19:19:26 +0200 Subject: [PATCH] index: don't attach listeners after each draw they are already attached when the plot is first created in the render. fixes exponential growth of listeners when the plot is re-drawn. --- src/index.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/index.tsx b/src/index.tsx index bb0f5e8..aad1606 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -48,7 +48,6 @@ class PlotlyChart extends React.Component { if (this.container) { // plotly.react will not destroy the old plot: https://plot.ly/javascript/plotlyjs-function-reference/#plotlyreact this.container = await plotly.react(this.container, data, Object.assign({}, layout), config); - this.attachListeners(); } };