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

131
Views
tabEndNewRow copies first fow instead of using provided data

In my code I pass to tabEndNewRow an intial empty row object. When you go to jsFiddle and enter something to C2 column and hit tab key then

  • new row is inserted - correct
  • entered value is assigned to C2 column of new row - error

if you use function for tabEndNewRow then it works as expected. Did I get it wrong?

var cols = [
    { title: "Cell 1", field: "c1" },
    { title: "Cell 2", field: "c2", editor: "input" }
];
        
var row = {"c1":"","c2":""}

var table = new Tabulator('#table', {
    columns: cols,
    data: [row],
    height:"100%",
    tabEndNewRow: row,
});

Tabulator v5.0.8

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

In your JS Fiddle, you are passing the row object into both the data optionand the tabEndNewRow option.

Because objects are passed by reference, edits to the row data are then stored in that same object which is called when the new row is created, so it is populated by the new data.

In your example you need to break the reference by calling Object.assign when passing the row object to the tabEndNewRow prop:

tabEndNewRow:Object.assign({}, row);
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!