{hero}

searchPanes.i18n.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 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 allows direct configuration on the language options for the SearchPanes instance. At this time using language.searchPanes.collapse has the same effect as setting this option. If both are provided, this will take preference, We've made this change for consistency in our APIs moving forward.

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

$(document).ready(function() {
    $('#example').DataTable({
        searchPanes: {
            i18n: {
                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({
        searchPanes: {
            i18n: {
                collapse: 'Search Options"
            }
        },
        buttons: [
            'searchPanes'
        ],
        dom: 'Bfrtip'
    });
});

Related

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