Multiple tooltip in same page open all at the same time
See original GitHub issueI usually have multiple react-tooltip for each place I want to show a tooltip.
Problem, after clicking the second tooltip, the first tooltip does not close. Therefore, user is seeing both tooltip opening at the same time.
My assumption is that data-for
and id
is there to avoid this from happening
<a data-event="click" data-for="first-click" data-tip="firstClick">
first tooltip
</a>
<ReactTooltip globalEventOff="click" id="first-click" />
<a data-event="click" data-for="second-click" data-tip="second-click">
second tooltip
</a>
<ReactTooltip globalEventOff="click" id="second-click" />
I understand that a better way is to put only one reacttooltip for the whole app. But, is there any way to make multiple reacttooltip to work?
Issue Analytics
- State:
- Created 5 years ago
- Comments:10
Top Results From Across the Web
Multiple tooltip in same page open all at the same time #377
Problem, after clicking the second tooltip, the first tooltip does not close. Therefore, user is seeing both tooltip opening at the same time....
Read more >React-tooltip rendering two times - Stack Overflow
I had this issue with data-for and id as well, the solution for me was to set a more unique identifier/a combination of...
Read more >How to Display Multiple Tooltips at the Same Time
Answer · Option 1: Use the Highlight function to show multiple info · Option 2: Add multiple info below the Sheet Name ·...
Read more >Multiple Tooltips - KendoReact Docs & Demos - Telerik
Render multiple Tooltips on the same page using KendoReact Tooltip. ... OPEN IN. Change Theme: default. This is the first Tooltip with position...
Read more >Controlling tooltips & pop-up menus with components in React
1. Open the tooltip · isOpen is for mounting and unmounting the tooltip component/JSX markup and · style is for positioning the tooltip...
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 FreeTop 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
Top GitHub Comments
Not sure if that will fulfill your requirements, but if you reach this issue there is a chance that below workaround may come in handy:
With multiple
TooltipDemo
components on one page the problem described by @joedevgee no longer occurs.@kkowalczuk do you mind doing your workaround using render props? I don’t understand hooks that much yet