select.selectable()
Get / set the function used to determine if a row should be selectable.
Please note - this property requires the Select extension for DataTables.
Description
This method allows dynamic assignment of the select.selectable
function, which is used to determine if a row should be selectable or not.
Types
function select.selectable()
- Description:
Get the function that is used to determine if a row is selectable.
- Returns:
Returns the function set using this method or
select.selectable
. If no function is defined,undefined
is returned.
function select.selectable( set )
- Description:
Set the table's selectable function.
- Parameters:
Name Type Optional 1 set
No Function used to determine if a row should be selectable or not. See
select.selectable
for the function's signature.- Returns:
DataTables API instance for chaining.
Example
Let the user select items using the os selection style:
let table = new DataTable('#myTable', {
select: true
});
table.select.selectable((data, tr, idx) => {
return data.selectable;
});
Related
The following options are directly related and may also be useful in your application development.