{hero}

searchPanes.panes.options.value

Since: SearchPanes 1.0.0

Define the value for an option of a custom pane.
Please note - this property requires the SearchPanes extension for DataTables.

Description

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

Types

string

Description:

If searchPanes.panes.options.value is a string then it will be used to decide whether to include rows in the results by directly comparing against the data in the table.

function

Description:

If searchPanes.panes.options.value is a function then this function will be used to decide whether a row is to be included or not. It returns a boolean value indicating this. The context of the function is the parent table. The data for the row is also provided so that the function is able to make an informed decision.

Parameters:
Returns:

Boolean indicating whether the row should be included in the results or not.

Default

  • Value: Undefined

The default value of searchPanes.panes.options.value is undefined as custom panes must be externally defined.

Example

Define custom pane options:

new DataTable('#myTable', {
	layout: {
		top1: 'searchPanes'
	},
	searchPanes: {
		panes: [
			{
				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.