{hero}

searchPanes.panes.className

Since: SearchPanes 1.0.0

Add a custom class for a custom pane.
Please note - this property requires the SearchPanes extension for DataTables.

Description

This option is an alias to searchPanes.panes.className, 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.className for full details of this option.

Type

string

Description:

Adds a custom class to the specified pane based on this string.

Default

  • Value: undefined

The default value for the searchPanes.className option is undefined as the standard should be without any custom classes.

Example

Add class name to custom panes:

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

Related

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