Use the new system of datatables-select 2.0 where checkboxes are true checkbox fields

This commit is contained in:
Jan Böhmer 2024-03-02 01:04:28 +01:00
parent 4295141fb6
commit b7ce91e2d8
4 changed files with 1554 additions and 24 deletions

View file

@ -98,6 +98,15 @@
dtOpts = config.options(dtOpts);
}
//Choose the column where the className contains "select-column" and apply the select extension to its render field
//Added for Part-DB
for (let column of dtOpts.columns) {
if (column.className && column.className.includes('dt-select')) {
column.render = $.fn.dataTable.render.select();
}
}
root.html(data.template);
dt = $('table', root).DataTable(dtOpts);
if (config.state !== 'none') {