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

Dynamic `visible` prop doesn't work as expected

Open benface opened this issue 4 years ago • 3 comments

I want to sometimes force a tooltip to be visible, but the same tooltip should then revert to "automatic visibility". I do something like visible={forceVisible ? true : undefined}, which seems to work up until forceVisible becomes false again – the tooltip remains visible even though I'm subsequently passing undefined as the visible prop. The only thing that makes it hide is making it false, but then it forces it to be hidden, instead of showing/hiding automatically.

benface avatar Aug 18 '21 06:08 benface

Doesn't look like the lib handles a dynamic change for that prop: https://github.com/atomiks/tippyjs-react/blob/master/src/Tippy.js#L46-L62

atomiks avatar Sep 05 '21 10:09 atomiks

Would love to see this prop handle dynamic updates! We'd also like to use it to manually hold a tooltip open, but are open to other suggestions on how to implement this.

briavicenti avatar Mar 24 '23 21:03 briavicenti

how is this not the default ?

Saidfatah avatar Nov 20 '23 09:11 Saidfatah