question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[FEAT REQ] Easier way to attach tooltips to dynamically generated elements

See original GitHub issue

In v4, I was able to create a single <ReactTooltip /> somewhere on my application, and use the data-for prop to share that same tooltip across all text elements (for example) in a table. Since it doesn’t seem to be any obvious way to do this in v5, I’m left with using wrapper components that generate an id (#836 is quite relevant here) for my anchor element, alongside the <Tooltip /> element.

I’m not sure if there is another way to do this aside from the data-* method, but it would definitely be very helpful, since that was a very convenient feature in v4. Anyway, I’ll understand if this is something the package is trying to shy away from completely in v5.

Another alternative that would make things easier, would be to go the @mui/material route, and be able to use the tooltip as a wrapper to the anchor element, but I’m not sure how viable that would be for the v5 architecture.

Issue Analytics

  • State:closed
  • Created 9 months ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
gabrieljablonskicommented, Dec 8, 2022

Btw, sorry for spamming a bit with opening issues. Started using the package a few days ago in my project, but almost dropped since I ran into a bug that was a deal-breaker.

Came here today looking for some guidance in the docs, and saw that v5 was released. Tried it out, and the bug was no more, so I decided to keep using it.

Aside from this and the other issues I’ve opened, v5 is working fine, so keep up the great work.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I bind Twitter Bootstrap tooltips to dynamically created ...
This works fine, but I add <a> elements dynamically and the tooltips aren't showing up for those dynamic elements. I know it's because...
Read more >
Adding Tooltips to dynamically created elements.
I've created a responsive table with a column that contains ... For each string in that <td> element, I would like a way...
Read more >
19 best open-source tooltip plugins made with jQuery, CSS ...
The best jQuery, JavaScript, and CSS tooltip plugins — all open-source and free to use. Create ... Attach tooltips to both static and...
Read more >
How to Custom Tooltip with dynamic HTML in JavaScript (ES5 ...
Tooltip loads HTML pages via HTML tags such as iframe, video, and map using the content property, which supports both string and HTML...
Read more >
The Best Looking CSS Tooltip Examples You Can Actually Use
CSS tooltips are excellent web tools to provide quick and simple explanations. These include additional details, word definitions, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found