columns.searchPanes.collapse
Allow the SearchPanes to be collapsed for specific columns.
Please note - this property requires the SearchPanes extension for DataTables.
Description
As standard, SearchPanes will be collapsible. A button is shown on the control row above the SearchPane table and the right most button toggles the state of the pane from being collapsed to expanded.
If this option is set to false the pane for this column will not be collapsible and the button will not be shown. It is possible to set this for all columns using the searchPanes.collapse
option, and the SearchPanes can be initialised in the collapsed state by using the searchPanes.initCollapsed
or columns.searchPanes.initCollapsed
options.
Type
boolean
- Description:
By setting the
columns.searchPanes.collapse
option tofalse
the searchpane for this column will not be collapsible and the collapse button will not be shown at the top of the pane.
Default
- Value:
true
The default value for the columns.searchPanes.collapse
parameter is true
, meaning that as standard the searchpanes are all collapsible.
Example
Don't allow SearchPanes to be collapsible on a specific column:
new DataTable('#myTable', {
layout: {
top1: 'searchPanes'
},
columnDefs: [
{
searchPanes: {
collapse: false
},
targets: [1]
}
]
});
Related
The following options are directly related and may also be useful in your application development.