I need to disable/enable to input some columns under certain conditions, can I do it with tabulator? Columns available or locked to input when I open page with table with some state (boolean or etc). Thank you.
example:
//define some sample data
var tabledata = [
{
id: 1,
name: "Oli Bob",
age: "12",
col: "red",
dob: ""
},
{
id: 2,
name: "Mary May",
age: "1",
col: "blue",
dob: "14/05/1982"
},
{
id: 3,
name: "Christine Lobowski",
age: "42",
col: "green",
dob: "22/05/1982"
},
{
id: 4,
name: "Brendon Philips",
age: "125",
col: "orange",
dob: "01/08/1980"
},
{
id: 5,
name: "Margret Marmajuke",
age: "16",
col: "yellow",
dob: "31/01/1999"
},
];
var table_3 = new Tabulator("#table_3", {
height: 205,
data: tabledata,
layout: "fitColumns",
columns: [
{
title: "Name",
field: "name",
width: 150,
editor: "input"
},
{
title: "Age",
field: "age",
align: "left",
formatter: "progress",
editor: "input"
},
{
title: "Favourite Color",
field: "col",
editor: "input"
},
{
title: "Date Of Birth",
field: "dob",
sorter: "date",
align: "center",
},
],
});
How can I disable editor: "input" under certain conditions?