1π
From the documentation page it looks like you control what columns are present in the table through an array:
data: {
columns: ['id', 'name', 'age'],
tableData: [
{ id: 1, name: "John", age: "20" },
{ id: 2, name: "Jane", age: "24" },
{ id: 3, name: "Susan", age: "16" },
{ id: 4, name: "Chris", age: "55" },
{ id: 5, name: "Dan", age: "40" }
]
};
Therefore when the page is loaded, you modify the array columns
to add or remove columns from your table dependant on the user type.
π€MJ_Wales
Source:stackexchange.com