cardView-display

Since: CardView 1.0.0

The CardView display has changed.
Please note - this property requires the CardView extension for DataTables.

Description

When using CardView, it can be useful to know when the DataTable changes between the card and table views. This event provides exactly that ability and will be triggered when the change happens (triggered via the API, buttons or a responsive action), after the display has been updated for the new view.

Type

function( e, display )

Parameters:

Example

Show a message when the view mode changes:

let table = new DataTable('#myTable', {
	cardView: true
});

table.on('cardView-display', function (e, mode) {
	console.log('CardView mode change:', mode);
});

Related

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