{hero}

responsive-display

Since: Responsive 2.0.0

The details for a row have been displayed, updated or hidden.
Please note - this property requires the Responsive extension for DataTables.

Description

It can sometimes be useful to know when the end user requests that Responsive show the details of the hidden rows in a column (be it in a child row or a modal), when those details are hidden or when the details have been updated. This event provides that ability.

Please note that, as with all DataTables emitted events, this event is triggered with the dt namespace. As such, to listen for this event, you must also use the dt namespace by simply appending .dt to your event name, or use on() which will automatically append this name space, as shown in the example below.

Type

function function( e, datatable, row, showHide, update )

Parameters:

Example

Listen for details display event using on():

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

table.on('responsive-display', function (e, datatable, row, showHide, update) {
	console.log(
		'Details for row ' + row.index() + ' ' + (showHide ? 'shown' : 'hidden')
	);
});