stateRestore.state().rename()
Since: StateRestore 1.0.0
Rename a state from StateRestore.
Please note - this property requires the StateRestore extension for DataTables.
Description
This method is used to alter the name of a state. State names are shown in any list of states to allow the end user to identify the state.
When renaming a state with this method, there is no confirmation modal, or user input presented - the change is simply applied. To allow the end user to enter the state name, use stateRestore.state().edit().
Type
stateRestore.state().rename(name)
Renames a stored state from the StateRestore extension.
Parameters:
| Name | Type | Optional | |
|---|---|---|---|
| 1 | name | No | |
The new name to be given to the state. | |||
Returns:
DataTable.Api: Returns a DataTables API instance for chaining.
Example
Rename a state:
table.stateRestore.state('{id}').rename('New Name');Related
The following options are directly related and may also be useful in your application development.