{hero}

responsive-resize

Since: Responsive 2.0.1

The columns displayed by Responsive has changed due to a resize.
Please note - this property requires the Responsive extension for DataTables.

Description

This event can be used to inform external libraries and controls that Responsive has changed the visibility of columns in the table in response to a resize or recalculation event. This can be particularly useful if you have an external control that depends upon columns being visible or you wish to update a control based on those columns.

Type

function function( e, datatable, columns )

Parameters:

Example

Listen for responsive resize event using on():

var table = new DataTable('#myTable', {
	responsive: true
});

table.on('responsive-resize', function (e, datatable, columns) {
	var count = columns.reduce(function (a, b) {
		return b === false ? a + 1 : a;
	}, 0);

	console.log(count + ' column(s) are hidden');
});