{hero}

updateState

Since: StateRestore 1.0.0

Saves the state to the relevant stateRestore instance.
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 saves the current state of the table into the relevant stateRestore instance, updating the state that is stored within that instance. This means that when this state's load button is pressed, the table will return to the state it was in when this update button was pressed.

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

This button is used within the stateRestore extension. It won't do anything if saving is disabled using the stateRestore.save initialisation option.

This button does not have any extra configuration options that are not available by default. The text in the button can be set by using the language.buttons.updateState option.

Example

updateState button modify text:

$.fn.dataTable.ext.buttons.updateState.text = function (e, dt, node, config) {
    return "Save state";
}