How to exclude columns from row selection in tabulator 5.2

Viewed 56

I have a table with selectable rows. I want to exclude clicks on the "SAS" column from changing the row selection.

var tabledata = [
  {name:"Oli Bob", location:"United Kingdom", gender:"male", col:"red", dob:"14/04/1984"},
  {name:"Jamie Newhart", location:"India", gender:"male", col:"green", dob:"14/05/1985"},
  {name:"Gemma Jane", location:"China", gender:"female", col:"red", dob:"22/05/1982" },
  {name:"James Newman", location:"Japan", gender:"male", col:"red", dob:"22/03/1998"},
];

var table = new Tabulator("#example-table", {
    data:tabledata,
    selectable: true,
    columns:[
      {title:"Row Num", formatter: "rownum"},
      {title:"Name", field:"name", width:200}, 
      {title:"SAS", formatter: "tickCross"} // exclude clicks on this column from changing the selection
],
});

Kind regards, simon

1 Answers
Related