{hero}

language.searchPanes.collapse

Since: SearchPanes 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

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

        The value of `-init language.searchPanes.collapse` is passed into an `-api 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 `-init language.searchPanes.collapse` to the desired `-type string`.

Type

string | object

Description:

language.searchPanes.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 language.searchPanes.collapse parameter is {0: 'SearchPanes', _: 'SearchPanes (%d)'}.

Examples

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

$(document).ready(function() {
    $('#example').DataTable({
        language: {
            searchPanes: {
                collapse: {
					0: 'Search Options',
					1: 'Search (one selected)',
					_: 'Search Options (%d)'
				}
            }
        },
        buttons: [
            'searchPanes'
        ],
        dom: 'Bfrtip'
    });
});

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

$(document).ready(function() {
    $('#example').DataTable({
        language: {
            searchPanes: {
                collapse: 'Search Options"
            }
        },
        buttons: [
            'searchPanes'
        ],
        dom: 'Bfrtip'
    });
});

Related

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