BarChart: make sure tooltip closes when user presses E (#34884)

This commit is contained in:
Oscar Kilhed 2021-05-28 23:24:03 +02:00 committed by GitHub
parent badec6c6ad
commit dfc466052d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -56,6 +56,7 @@ export const TooltipPlugin: React.FC<TooltipPluginProps> = ({
}
return () => {
setCoords(null);
if (plotCtx && plotCtx.plot) {
plotCtx.plot.over.removeEventListener('mouseleave', plotMouseLeave);
}