checkShown callback
See original GitHub issueI am using react with tippyjs. My tooltip content is hardly dynamic and interactive. User selecting components and editing it in tooltip. In my scenario tooltip must be show after tooltip content is rendered. My solution is https://github.com/ismail-codar/tippyjs/blob/master/src/js/tippy.js#L478
Usage:
new Tippy(domNode, {
interactive: true,
checkShown: (callback) => {
const tooltipDom: HTMLElement = popup.getPopperElement(popup.tooltippedEls[0]).querySelector(".tippy-tooltip-content");
//change model for react rendering
// ... some codes
// ... some codes
setTimeout(() => {
//and react rendered here refresh tooltip content and call callback for tooltip showing
if (tooltipDom.firstChild)
tooltipDom.firstChild.remove()
tooltipDom.appendChild(activeTooltip.tooltipDomNode)
callback()
}, 0)
}
})
If @atomiks can be implement any solution like this integration with react like libraries is will be easy.
And another benefit is client side authority control etc can be done before tooltip open. I think https://github.com/atomiks/tippyjs/issues/23 related this.
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Inline callback function within a callback? - Stack Overflow
The animate callback is a closure¹, ² over var1 and callback (more accurately, over the lexical environment they exist within), so they'll remain ......
Read more >How to use the ModelCheckpoint callback with Keras and ...
Learn how to monitor a given metric such as validation loss during training and then save high-performing networks to disk.
Read more >trade-liberalization-and-chinese-students-us-higher-education ...
The results of this check, shown in the third row in Table 5, ... a US degree receive lower call-back rates than Chinese...
Read more >Setting up wolfEngine to be used with OpenSSL (Page 1)
I would like to perform the sanity check shown at 16:00 in the webinar but I'm not sure where the shared object resides...
Read more >Vueper Slides - GitHub Pages
checkShow multiple items per slides. checkInfinite looping, customizable arrows or ... checkEmitted events for callbacks, etc... checkSupports RTL direction.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Hi @ismail-codar, I found a better solution for dynamic and interactive tooltip. Could you please check https://github.com/tvkhoa/react-tippy for that ? (disabled and html props)
Btw, @atomiks Thanks for your beautiful tooltip project. I port it to React component so that react user can use it conveniently. 😃
Hi @ismail-codar , I miss the notification so sorry for the late response. You can pass the
react elementtohtmlprop. It’s sth like thatI think your current solution in React is an error-prone. Example: you can not pass the event like
onChangeoronClickto your tooltip content.