You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by mi...@apache.org on 2023/08/11 16:40:52 UTC

[superset] branch master updated: fix: Tooltips don't disappear on the Heatmap chart (#24959)

This is an automated email from the ASF dual-hosted git repository.

michaelsmolina pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git


The following commit(s) were added to refs/heads/master by this push:
     new 9703490129 fix: Tooltips don't disappear on the Heatmap chart (#24959)
9703490129 is described below

commit 97034901291420af844257fc76ac107d4a891f18
Author: Michael S. Molina <70...@users.noreply.github.com>
AuthorDate: Fri Aug 11 13:40:45 2023 -0300

    fix: Tooltips don't disappear on the Heatmap chart (#24959)
---
 .../plugins/legacy-plugin-chart-heatmap/src/ReactHeatmap.jsx       | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/superset-frontend/plugins/legacy-plugin-chart-heatmap/src/ReactHeatmap.jsx b/superset-frontend/plugins/legacy-plugin-chart-heatmap/src/ReactHeatmap.jsx
index 22dde813b6..6e016b4774 100644
--- a/superset-frontend/plugins/legacy-plugin-chart-heatmap/src/ReactHeatmap.jsx
+++ b/superset-frontend/plugins/legacy-plugin-chart-heatmap/src/ReactHeatmap.jsx
@@ -21,7 +21,12 @@ import { reactify, css, styled } from '@superset-ui/core';
 import { Global } from '@emotion/react';
 import Component from './Heatmap';
 
-const ReactComponent = reactify(Component);
+function componentWillUnmount() {
+  // Removes tooltips from the DOM
+  document.querySelectorAll('.d3-tip').forEach(t => t.remove());
+}
+
+const ReactComponent = reactify(Component, { componentWillUnmount });
 
 const Heatmap = ({ className, ...otherProps }) => (
   <div className={className}>