kadoshms / react-jvectormap

A react wrapper for jvectormap maps
MIT License
98 stars 70 forks source link

jvectormap-tip staying in DOM #60

Closed Gunner17 closed 4 years ago

Gunner17 commented 4 years ago

A lot of times I see that the jvectormap-tip is staying in the DOM (screenshot attached), sometimes even showing up although the map has transitioned. It might significantly impact the usability. What is the best way to clean these tooltips? Is there a way to do a manual cleanup?

Screen Shot 2020-04-23 at 1 23 19 AM
prakhar-pal commented 4 years ago

This issue seems to be duplicate of https://github.com/kadoshms/react-jvectormap/issues/2

To do manual cleaning do the following when transitioning -

Array.from(document.getElementsByClassName("jvectormap-tip")).forEach((el) => { el.style.display = "none"; });

For more details and caveats, see the linked issue https://github.com/kadoshms/react-jvectormap/issues/2

Gunner17 commented 4 years ago

It helped me! Closing the issue.