Since: StateRestore 1.0.1

Get the details of all of the currently active states.
Please note - this property requires the StateRestore extension for DataTables.


This method provides the ability to retrieve details about all of the currently active states that are managed by the StateRestore extension.

The method is plural as it is possible to have multiple states that are active at the same time.

A DataTables API instance is returned containing all of the active states as objects. Each object contains the following properties.

  • name - The name of the state.
  • data - The data that is used to implement the state.


function stateRestore.activeStates()


Retrieves a stored state from the StateRestore extension.


Returns a DataTables API containing an array of details about the states that are currently active.


Get the currently active states:

var table = new DataTable('#myTable', {
	layout: {
		topStart: {
			buttons: ['createState', 'savedStates']