{hero}

columns.searchPanes.preSelect

Since: SearchPanes 1.0.0

Deprecated. Pre-selected options in a pane.
Please note - this property requires the SearchPanes extension for DataTables.

Description

This option is deprecated from version 2.0.0+. It was replaced by searchPanes.preSelect which allowed the order that the selections were made in to be defined. This allowed preselecting to become compatible with searchPanes.cascadePanes

As standard, SearchPanes will not pre-select any values in any of the panes.

If any of the elements in the array held in columns.searchPanes.preSelect are present in the pane then they will be pre-selected.

Note: Before version 2.0.0, where this option was deprecated, columns.searchPanes.preSelect was not supported with searchPanes.cascadePanes. This was because in order to have the cascade operate as expected the selections had to be made in the correct order. It is however now possible in versions after 2.0.0 using searchPanes.preSelect

Type

Array

Description:

By setting the columns.searchPanes.preSelect option to an array of string values, the pane produced for that column will be searched and if the values of the columns.searchPanes.preSelect option are found then they will be pre-selected.

Default

  • Value: undefined

The default value for the columns.searchPanes.preSelect parameter is undefined. When this default value is in place, no values will be preSelected in the pane.

Example

Pre-select values in a pane:

new DataTable('#myTable', {
	layout: {
		top1: 'searchPanes'
	},
	columnDefs: [
		{
			searchPanes: {
				preSelect: ['Edinburgh', 'London']
			},
			targets: [3]
		}
	]
});

Related

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