statesTable

Since: StateRestore 2.0.0

State management in a popup table.
Please note - this property requires the StateRestore extension for DataTables.

Description

This button provides a primary interaction point for StateRestore to the end user (typically you would select between this button or statesList). When activated it will cause a modal to show with a table listing the states that are available to the end user. Those states can be loaded through a button in the table, or managed (i.e. edited, updated or removed) using a list of buttons above the table. The create state button is also available there, or you can select to present stateCreate at the top level if you prefer.

The table of states is a regular DataTable, which as scrolling enabled and shows a summary of information about the states (name, sharing status, default, etc).

Please note that the label for this button defaults to "Saved states", which can be customised with the stateRestore.button.statesTable language option (see language.stateRestore), or with the button's text option.

Example

Simple use case:

new DataTable('#myTable', {
	layout: {
		topStart: {
			buttons: ['statesTable]
		}
	},
	stateRestore: true
});

Related

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