searchPanes.panes.options
Define the options for custom panes.
Please note - this property requires the SearchPanes extension for DataTables.
Description
As standard, Custom panes have no options.
Setting searchPanes.panes.options
to contain objects made up of both searchPanes.panes.options.label
and searchPanes.panes.options.value
will allow options to be defined within the custom panes. The label
option is what will be displayed to the user and the value
option is a function that will be used to search the DataTable.
Type
Array
- Description:
The
searchPanes.panes.options
array allows custom options to be declared for Custom Panes.
Default
- Value:
Undefined
The default value of searchPanes.panes.options
is undefined as custom panes must be externally defined.
Example
Define custom pane options:
new DataTable('#myTable', {
layout: {
top1: {
searchPanes: {
panes: [
{
options: [
{
label: 'Accountants in Tokyo',
value: function (rowData, rowIdx) {
return rowData[2] === 'Accountant' && rowData[3] === 'Tokyo';
},
className: 'tokyo'
}
]
}
]
}
}
}
});
Related
The following options are directly related and may also be useful in your application development.