select.keys()
Get / set Select's keyboard navigation state.
Please note - this property requires the Select extension for DataTables.
Description
Dynamic control for the select.keys
option. This method can be used to dynamically enable, or disable, the keyboard navigation and row selection control provided by Select.
Types
select.keys()
Get the keyboard navigation state for the table.
Returns:
boolean
Current state - true
if keyboard navigation is enabled, false
otherwise. Note that if multiple tables are defined in the API's context, only the state of the first table will be returned.
select.keys( flag )
Set the keyboard navigation state for the table's selection options.
Parameters:
Name | Type | Optional | |
---|---|---|---|
1 | flag | No | |
Value to set for the keyboard navigation option - |
Returns:
DataTables.Api
DataTables API instance for chaining.
Example
Enable keyboard navigation and selection using the API:
var table = new DataTable('#myTable');
table.select.style('os');
table.select.keys(true);
Related
The following options are directly related and may also be useful in your application development.