stateRestore
A split button that represents and provides functionality for a saved state.
Please note - this property requires the StateRestore extension for DataTables.
Description
This is used as the primary button within a split button that represents and provides functionality for a saved state. The primary function of the button loads the state it is representing into the table. This includes information such as ordering, searching and also the state of some extensions.
There are 3 secondary buttons also within the split button - updateState
, removeState
and renameState
. Their documentation provides further details relevant to their functionality.
This button is used within the StateRestore extension.
This button does not have any additional configuration options available to it, beyond the standard set offered for all Buttons (e.g. text
). The default text used in the button can be set by using the language.buttons.stateRestore
option.
Example
stateRestore button modify action:
DataTable.ext.buttons.stateRestore.action = function (e, dt, node, config) {
e.stopPropagation();
config._stateRestore.load(config._stateRestore.s.identifier);
console.log('Loaded state ' + config._stateRestore.s.identifier);
};