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

Can't add clickable components to tooltip

Open mohammedgqudah opened this issue 6 years ago • 2 comments

Hi, Thank you for this awesome component :). i tried adding a button in the tooltip using the html prop but the event is not firing i think this is because the event.stopPropagation() on the tooltip component,, how to fix that because it will be nice to be able to add buttons...

mohammedgqudah avatar Jun 23 '18 12:06 mohammedgqudah

I think this can be done by adding the id of the component that will close the tooltip on click instead of window.addEventLister ==> document.getElementById(this.props.closeID).addEventLister can you please add this feature :)

mohammedgqudah avatar Jun 23 '18 12:06 mohammedgqudah

Thanks for your feedback and suggestion @mohammedgqudah,

Actually, that window.addEventLister is to catch the outside click and close tooltip, and it is by design.

But I don't see it the issue for adding button with events, could you please share a snippets on your code that include the event definition and how you create your tooltip then we could see is there anything we could do here?

tuanthieu2993 avatar Oct 02 '18 17:10 tuanthieu2993