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

176
Vistas
Is there a way to return cell data as a tooltip in Tabulator (v5.0.7)

I want to start by saying that I am by no means an expert in JavaScript, so apologies in advance if I am missing something obvious.

Example: I'm trying to create a custom tooltip for column A. Using the data from another cell as the parameter for the output of column A's tooltip.

{title: "title", tooltip: function(cell) {return anotherfunction(cell)}...

When passing 'cell' through as a parameter, it's possible to view the information in the rest of the row console.log(cell._cell) but from what I've discovered, there's no way of accessing the rest of the data.

This is a code pen of the issue that I'm having (i've commented out the console.log(cell._cell.value) in the example, as this will make the table fail to render. So, looking at the browsers console, it's possible to see the data that is returned from console.log(cell._cell).

I've tried to use Tabulators cell.getData(), cell.getRow(), cell.getColumn() etc (and a load of others) but each results in an error.

Codepen https://codepen.io/lukeorriss/pen/yLzMapg

If someone could please point me in the right direction for accessing the data in another row from a tooltip function, this would be great. Thank you all, in advance.

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Tabulator use 2 types of definitions for tooltip .

  1. ColumnComponent (Header Cell)
  2. Cell (Data Cell)

So You have to put a condition for your formatTooltip function

function formatTooltip(cell) {
    // Need to open browser console log to view this.
    if (cell._cell) {
        let { name, email, address } = cell.getData();

        return `You are ${name}, your email is ${email} and address is ${address}`;
    } else if (cell.type === "ColumnComponent") {
        return cell.getField();
    }
}

See My Codepen

about 4 years ago · Juan Pablo Isaza Denunciar
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