stateRestore.state().remove()
Delete a state.
Please note - this property requires the StateRestore extension for DataTables.
Description
This method provides the ability to remove a state that is managed by the StateRestore extension.
stateRestore.state().remove() cam take a single argument, skipModal that allows the confirmation modal to be bypassed. The default for skipModal is false, meaning that the modal will be shown. It removes the state retrieved by the previous call to stateRestore.state().
Note that predefined states (stateRestore.preDefined) cannot be removed, nor can states which have been shared by other users.
Type
stateRestore.state().remove()
Deletes the selected state.
Parameters:
| Name | Type | Optional | |
|---|---|---|---|
| 1 | skipModal | Yes - default:false | |
Boolean value indicating if the confirmation modal should be skipped or not. The default is | |||
Returns:
DataTable.Api: Returns a DataTables API instance for chaining.
Examples
Remove a state, showing the confirmation modal:
table.stateRestore.state('{id}').remove();Remove a state, skipping the confirmation modal:
table.stateRestore.state('{id}').remove(true);Related
The following options are directly related and may also be useful in your application development.