columns.searchPanes.initCollapsed
Collapse Specific SearchPanes on initialisation.
Please note - this property requires the SearchPanes extension for DataTables.
Description
As standard, SearchPanes will not be collapsed on initialisation. This option allows that to happen on a per column basis. The SearchPane for this column will not be collapsed on initialisation even if this option is set to true
in a variety of scenarios. Firstly, if searchPanes.collapse
or columns.searchPanes.collapse
are set to false. Secondly, if statesaving is enabled and this SearchPane was not collapsed at the point of the last state save.
This behaviour can be set on for all columns by using the columns.searchPanes.initCollapsed
initialisation option.
Type
boolean
- Description:
By setting the
columns.searchPanes.initCollapsed
option totrue
the SearchPane for that column will be initialised in the collapsed state.
Default
- Value:
false
The default value for the columns.searchPanes.initCollapsed
parameter is false
, meaning that as standard the searchpanes are not collapsed on initialisation.
Example
Collapse a Specific SearchPane on Initialisation:
new DataTable('#myTable', {
layout: {
top1: 'searchPanes'
},
columnDefs: [
{
searchPanes: {
initCollapsed: true
},
targets: [1]
}
]
});
Related
The following options are directly related and may also be useful in your application development.