select.toggleable
Since: Select 1.3.1
Disable the deselection of selected rows when clicked.
Please note - this property requires the Select extension for DataTables.
Description
This option provides the ability to disable the deselection of selected rows when they are clicked. As standard when a selected row is clicked it will be deselected. When the select.toggleable
option is set to false
then it will disable this feature and selected rows will not deselect when they are clicked.
Type
Default
- Value:
false
Example
Disable the deselection of selected rows when clicked:
$(document).ready(function () {
let table = new DataTable('#myTable', {
select: {
toggleable: false
}
});
table.row(2).select();
});