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 }) => (