Since: StateRestore 1.0.0

Remove states from StateRestore.
Please note - this property requires the StateRestore extension for DataTables.


This method provides the ability to remove multiple states that are managed by the StateRestore extension.

stateRestore.states().remove() takes one argument, skipModal that allows the confirmation modal to be bypassed for each state. The default value for skipModal is false meaning that the modal will be shown. It removes the states retrieved by the previous call to stateRestore.states().

A DataTables API instance is returned so that further chaining can occur.

If the remove option of the stateRestoreConfig configuration object is set to false then this API method will not do anything.


function stateRestore.states().remove()


Removes stored states from the StateRestore extension.


Returns a DataTables API for chaining.


Remove states called 'New State' and 'Old State':

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

table.stateRestore.states(['New State', 'Old State']).remove();


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