Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

144
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda