{hero}

removeState

Since: StateRestore 1.0.0

Removes a state from storage.
Please note - this property requires the StateRestore extension for DataTables.

Description

This is used as one of the secondary buttons within the stateRestore split button that represents and provides functionality for a saved state. This button removes the relevant state. This completely removes the state from storage, as well as removing the buttons that represent it.

A confirmation modal is shown when the button is pressed to confirm that this is what the user wants to do.

There are 2 other secondary buttons also within the split button - renameState and updateState. Their documentation provides further details relevant to their functionality.

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.

This button does not have any additional configuration options available to it, beyond the standard set offered for all Buttons (e.g. text). The text in the button can be set by using the language.buttons.removeState option.

Example

renameState button modify text:

DataTable.ext.buttons.renameState.text = function (e, dt, node, config) {
	return 'Rename State';
};