{hero}

searchPanes.panes

Since: SearchPanes 1.0.0

Define custom panes to filter across all columns.
Please note - this property requires the SearchPanes extension for DataTables.

Description

This option is an alias to searchPanes.panes, which should be preferred when using DataTables 2+. It can be used to configure SearchPanes regardless of how the panes are inserted into the document (layout or searchPanes).

Please refer to the documentation for searchPanes.panes for full details of this option.

Type

array

Description:

The searchPanes.panes array contains object defining each pane. Each object contains a header property which holds the title of the pane. There is also an options array in the same form as columns.searchPanes.options. It is also possible to defined dtOpts and custom classes within the object. See columns.searchPanes.dtOpts and columns.searchPanes.className for details on these.

Default

  • Value: undefined

The default value of searchPanes.panes is undefined. If there are no custom panes defined then none will be added.

Example

Define custom pane::

new DataTable('#myTable', {
	layout: {
		top1: 'searchPanes'
	},
	searchPanes: {
		panes: [
			{
				header: 'custom',
				options: [
					{
						label: 'Accountants in Tokyo',
						value: function (rowData, rowIdx) {
							return rowData[2] === 'Accountant' && rowData[3] === 'Tokyo';
						}
					}
				]
			}
		]
	}
});

Related

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