react-tooltip icon indicating copy to clipboard operation
react-tooltip copied to clipboard

[FEAT REQ] Close the tooltip after delay even while still hovering the anchor element

Open ggnu11 opened this issue 1 year ago • 6 comments

When mouse hover, the tooltip is displayed, and I want to close it 5 seconds after the tooltip is displayed.

I customized the tooltip using afterShow and afterHide, but there is a problem.

If you hover your mouse over id=test1 and move your mouse to id=test2 to open the tooltip and mouse over the existing test1 again, there is a bug that closes immediately, not after 5 seconds.

When the id changes, I want to initialize the timeOut of that id when I do mouseLeave.

I'm going to solve this method and set the tooltip duration to 5 seconds, so if there's a good way other than this, please share it.

  • condeSandBox https://codesandbox.io/p/sandbox/tooltip-w2q7ll?file=%2Fsrc%2FApp.tsx%3A15%2C14-15%2C19

ggnu11 avatar Jul 22 '24 05:07 ggnu11