1

Im using react-simple-maps with react-tooltip Looks like the hover works fine, but I try to click on a link I've added on the tooltip but before I can get to the tooltip, it disappears and I can't access the content with my mouse.

is this possible?

Ken Ryan
  • 539
  • 1
  • 10
  • 31
  • Don't cry understand. Can you provide a minimal reproducible example? – Someone Special Mar 03 '22 at 23:34
  • https://www.react-simple-maps.io/examples/map-chart-with-tooltip/ I am using this library, notice when you hover, the tooltip appears, but once the pointer leaves, it disappears. One can't access the content inside the tooltip, say I wanted to add a link or button? – Ken Ryan Mar 03 '22 at 23:36
  • 1
    You need to show your own codes, with your attempt. Because looking at the example code, you can see the hover is simply created with `setContent` and react-tooltip. You can choose other ways to display – Someone Special Mar 03 '22 at 23:44
  • 1
    tip for you - react-tooltip `clickable` prop – Someone Special Mar 03 '22 at 23:48

1 Answers1

0

Depending on what your implementation specifically looks like, I think the delayHide property is what you're looking for. It defines the delay after the hover event ends until the tooltip disappears, in milliseconds.

<ReactTooltip delayHide={1000} />
Jacob K
  • 1,096
  • 4
  • 10
  • But will I be able to access the content inside the tooltip? – Ken Ryan Mar 04 '22 at 21:51
  • Have you tried? It shouldn't take too long to verify, but if you also have the items within as clickable, then it should solve the problem you initially stated that the tooltip disappears before you can get to it. – Jacob K Mar 05 '22 at 01:27