columns().columnControl.searchList()
Load new options for the search list.
Please note - this property requires the ColumnControl extension for DataTables.
Description
This method provides the same functionality as column().columnControl.searchList()
but for multiple columns. As a result, it is expected that you would typically use the refresh
option with this method call, rather than providing an array of options, which would then the applied to all columns.
Type
columns().columnControl.searchList( options )
Rebuild the search list with new options, either read from the column, or provided.
Parameters:
Name | Type | Optional | |
---|---|---|---|
1 | options | No | |
This parameter can take one of three forms:
|
Returns:
DataTables.Api
:
API instance that contains a reference to the selected columns.
Example
Re-read the table control and rebuild all searchList
controls:
let table = new DataTable('#myTable', {
columnControl: ['order', ['searchList']]
});
document.querySelector('#reloadOptions').addEventListener('click', () => {
table.columns().columnControl.searchList('refresh');
});
Related
The following options are directly related and may also be useful in your application development.