Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

154
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda