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

180
Views
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 answers
Answer question

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 Report
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!