{hero}

searchPanes.initCollapsed

Since: SearchPanes 1.4.0

Collapse the 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. The SearchPanes 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 a column by column basis by using the columns.searchPanes.initCollapsed initialisation option.

Type

boolean

Description:

By setting the searchPanes.initCollapsed option to true all of the SearchPanes will be initialised in the collapsed state.

Default

  • Value: false

The default value for the searchPanes.initCollapsed parameter is false, meaning that as standard the searchpanes are not collapsed on initialisation.

Example

Collapse all SearchPanes on initialisation:

new DataTable('#myTable', {
	layout: {
		top1: {
			searchPanes: {
				initCollapsed: true
			}
		}
	}
});

Related

The following options are directly related and may also be useful in your application development.