xxxxxxxxxx
1
<div id="datatable-cell-format" data-mdb-sort-field="purchases" data-mdb-sort-order="desc"></div>
xxxxxxxxxx
1
#datatable-cell-format > div.datatable-inner.table-responsive.ps > table > thead > tr > th:nth-child(3) {
2
display: none;
3
}
xxxxxxxxxx
1
const rows = [
2
['Product 1', 10, 103],
3
['Product 2', 45, 110],
4
['Product 3', 76, 56],
5
['Product 4', 89, 230],
6
['Product 5', 104, 240],
7
['Product 6', 97, 187],
8
['Product 7', 167, 130],
9
['Product 8', 50, 199],
10
['Product 9', 4, 206],
11
['Product 10', 120, 88],
12
['Product 11', 22, 100],
13
];
14
15
16
17
18
const columns = [
19
{ label: 'Product', field: 'product' },
20
{ label: 'Quantity', field: 'quantity' },
21
{ label: 'Purchases', field: 'purchases'},
22
];
23
24
const datatableInstance = new mdb.Datatable(
25
document.getElementById('datatable-cell-format'),
26
{ rows, columns }
27
);
Console errors: 0