{hero}

removeAllStates

Since: StateRestore 1.0.0

Removes all stored states.
Please note - this property requires the StateRestore extension for DataTables.

Description

This button can be displayed at the top level alongside the savedStates and createState buttons. This button removes all saved states. This completely removes the states from storage, as well as removing the buttons that represent them.

A confirmation modal is shown as default when using this button, although this can be disabled using the confirmModal option.

This button is used within the StateRestore extension. It won't do anything if removing states is disabled using the remove option of the stateRestoreConfig configuration object of the parent button.

    The text in the button can be set by using the `-init language.buttons.removeAllStates` option.

Options

This button can have the following options set in its configuration object to customise its actions and display, in addition to those options which are available for all buttons (e.g. buttons.buttons.text):

config

This option allows for StateRestore to be configured, particularly for column specific options.

Example

removeAllStates button modify text:

DataTable.ext.buttons.removeAllStates.text = function (e, dt, node, config) {
	return 'Remove Everything';
};