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

Tooltip doesn't close when another is displayed

Open Gus-2 opened this issue 5 years ago • 3 comments

I have a

balise that contains the data-event="click" that trigger the Tooltip when clicked.

Inside this td, I have a the Tooltip component balise that has the attribute globalEventOff="click" and work only if I click outside anything that trigger a tooltip. But when I click on another

, it opens another tooltip but doesn't close the tooltip opened before.

I saw on a stack post that I can use the {'focusout'} but didn't work.

How can I fix that ?

<TableContentTdBoldClickable key={week} data-for={i} data-event="click" data-tip>{datas[key][week]} <ReactTooltip id={i} globalEventOff='click' place="right" clickable={true}> <ExpandViewDetailClient week={week} title={INTAKES} /> </ReactTooltip> </TableContentTdBoldClickable>

Gus-2 avatar Dec 11 '20 10:12 Gus-2

Is there an update on this issue. We require a similar functionality hwere there should be only one tooltip instance displayed on the screen. However, I can open multiple tooltips simultaneously.

A workaround would also be appreciated.

amittras-pal avatar Sep 17 '21 11:09 amittras-pal

The same problem. Any ideas how to hide another toolpips or maybe add z-index higher then other toolpips?

DvoeglazovIlya avatar Dec 22 '21 10:12 DvoeglazovIlya

Maybe it help, add isCapture={true} to your tooltip https://github.com/wwayne/react-tooltip/issues/590

DvoeglazovIlya avatar Dec 22 '21 10:12 DvoeglazovIlya

Hi,

Closing this issue due to: https://react-tooltip.com/docs/examples/state

You guys can handle the state of the tooltip in V5 or higher and show which tooltip you want, please open a new issue if necessary.

Thanks!

danielbarion avatar Nov 30 '22 21:11 danielbarion