{hero}

searchPanes.i18n.collapse

Since: SearchPanes 1.1.0

Set the message to be displayed in the SearchPanes Button.
Please note - this property requires the SearchPanes extension for DataTables.

Description

SearchPanes will set the SearchPanes Button to display the total number of selections across the panes alongside the SearchPanes title.

The value of searchPanes.i18n.collapse is passed into an i18n() function, %d is replaced by the count of selections across the panes. To just set the Button text to be a string no matter the count, just set searchPanes.i18n.collapse to the desired string.

This option will default to the value given by language.searchPanes.collapse, which should generally be preferred over this option as the language strings can be loaded by Ajax and shared for the whole table, but if needed, this option is available to override that on a per instance basis.

Type

string | object

Description:

searchPanes.i18n.collapse changes what will be displayed in the text of the SearchPanes Button. It can also display the count of selections across the panes.

Default

  • Value: {0: 'SearchPanes', _: 'SearchPanes (%d)'}

The default value for the searchPanes.i18n.collapse parameter is {0: 'SearchPanes', _: 'SearchPanes (%d)'}.

Examples

Change message for SearchPanes button which also displays selection count::

new DataTable('#myTable', {
	searchPanes: {
		i18n: {
			collapse: {
				0: 'Search Options',
				1: 'Search (one selected)',
				_: 'Search Options (%d)'
			}
		}
	},
	layout: {
		topStart: {
			buttons: ['searchPanes']
		}
	}
});

Change message for SearchPanes button to only be a string::

new DataTable('#myTable', {
	searchPanes: {
		i18n: {
			collapse: 'Search Options'
		}
	},
	layout: {
		topStart: {
			buttons: ['searchPanes']
		}
	}
});

Related

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