Skip to content

Commit

Permalink
fix: remove sticky tooltip when query returns no data in explore view (
Browse files Browse the repository at this point in the history
…#42)

Tap into the newly added `willUnmount` hook to clean up sticky tooltip that nvd3 adds to `body` directly. This removes such tooltips that were left behind in the explore view with the new query returns 'no data'.
  • Loading branch information
xtinec authored and zhaoyongjie committed Nov 26, 2021
1 parent 223c2f8 commit 8b4bb80
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,10 @@
*/
import { reactify } from '@superset-ui/chart';
import Component from './NVD3Vis';
import { hideTooltips } from './utils';

export default reactify(Component);
function willUnmount() {
hideTooltips(true);
}

export default reactify(Component, { willUnmount });

0 comments on commit 8b4bb80

Please sign in to comment.