stateLoaded
State loaded callback.
Description
Callback that is fired once the state has been loaded (stateLoadCallback
) and the saved data manipulated (if required - stateLoadParams
).
This callback is useful if you simply wish to know information from the saved state, without getting into the inner workings of where and how the state information has been saved. For example it can be useful for populating custom filter inputs.
Type
function stateLoaded( settings, data )
- Parameters:
Name Type Optional 1 settings
No DataTables settings object
2 data
No Data to save. The data comes from
stateSaveParams
Example
Display the saved global filter:
new DataTable('#myTable', {
stateSave: true,
stateLoaded: function (settings, data) {
alert('Saved filter was: ' + data.search.search);
}
});
Related
The following options are directly related and may also be useful in your application development.