{hero}

searchPanes.filterChanged

Since: SearchPanes SearchPanes 1.2.0

Function to update title text when selections are made.
Please note - this property requires the SearchPanes extension for DataTables.

Description

This function is called every time the number of SearchPanes options that have been selected changes. As default this is used to update the SearchPanes title (set using the searchPanes.i18n.title config option alongside an i18n() api call).

The SearchPanes button also uses this configuration option to update the button text to reflect the selection numbers (text is set using searchPanes.i18n.collapse and an i18n() api call).

The context of the function is the DataTables instance, meaning that API methods can be called directly from within the function. For example...

this.i18n(...);

Type

function searchPanes.filterChanged(count)

Parameters:

Example

Set text for custom element:

$(document).ready(function() {
	$('#example').DataTable({
		searchPanes: {
			filterChanged: function(count) {
				$('.SPDetails').text(this.i18n('searchPanes.collapse', {0: 'AdvancedFilter', _: 'Advancedfilter (%d)'}, count));
			}
		}
		dom: 'Plfrtip'
	});
});