stateRestore.state().load()
Load a state from StateRestore into the table.
Please note - this property requires the StateRestore extension for DataTables.
Description
This method provides the ability to load a state that is managed by the StateRestore extension into the table.
stateRestore.state().load()
takes no arguments. It loads the state retrieved by the previous call to stateRestore.state()
.
A DataTables API instance is returned so that further chaining can occur.
Type
function stateRestore.state().load()
- Description:
Loads a stored state from the StateRestore extension into the table.
- Returns:
Returns a DataTables API for chaining.
Example
Load a state called 'New State':
var table = new DataTable('#myTable', {
layout: {
topStart: {
buttons: ['createState', 'savedStates']
}
}
});
table.stateRestore.state('New State').load();
Related
The following options are directly related and may also be useful in your application development.