Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

143
Views
When using tippyjs-react singleton, can I figure out the target tooltip inside the callbacks that attached to source tooltip?

So I have several Target tooltips and one Source, I want to attach onTrigger or onShow callback to the Source tooltip. Is there an easy way to figure out inside callback which Target tooltip is shown?

I don't want to check against smth like outerHtml etc, but rather to somehow attach ID to the tooltip, or at least some data-*** attribute

Example: https://codesandbox.io/s/optimistic-paper-8or8vc?file=/src/App.js

  <Tippy content="OneOneOneOneOneOneOneOneOne" singleton={target}>
    <button>One</button>
  </Tippy>

  <Tippy content="TwoTwoTwoTwoTwoTwoTwoTwoTwo" singleton={target}>
    <button>Two</button>
  </Tippy>

  <Tippy
    singleton={source}
    onTrigger={function (instance, event) {
      // is there a way for me to figuereout which target was the trigger?
      console.log(instance, event);
    }}
  />
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!