state.loaded()

Since: DataTables 1.10.1

Get the table state that was loaded during initialisation.

Description

This method is primarily made available for plug-in authors who wish to get the state of a DataTable when it is initialised to restore state saved functionality of their own plug-in.

The structure of the object returned by this method matches the state object, as defined by state().

Type

function state.loaded()

Description:

Get the table state that was loaded during initialisation

Returns:

State saved object. See state() for the object format.

Example

Listen for DataTables initialisation and get the state:

$(document).on( 'init.dt', function ( e, settings ) {
	var api = new $.fn.dataTable.Api( settings );
	var state = api.state.loaded();

	// ... use `state` to restore information
} );

Related

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