Since: SearchBuilder SearchBuilder 1.0.0

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


This function is called every time the number of SearchBuilder conditions that are active changes. As default this is used to update the SearchBuilder title (set using the language.searchBuilder.title config option alongside an i18n() API call).

The SearchBuilder button also uses this configuration option to update the button text to reflect the selection numbers (text is set using searchBuilder.i18n.button 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(...);.


function searchBuilder.filterChanged(count)



Set text for custom element:

$(document).ready(function() {
	var table = $('#example').DataTable({
		searchBuilder: {
			filterChanged: function(count) {
				$('.SBDetails').text(table.i18n('searchBuilder.collapse', {0: 'AdvancedFilter', _: 'Advancedfilter (%d)'}, count));
		dom: 'Qlfrtip'