StateRestore 2.0

Friday 11th September, 2026

StateRestore 2.0 is a complete rewrite of the StateRestore software, with focus on first class Ajax storage of states, and the ability to set a default state for users. The StateRestore v1 options didn't readily provide a way for these two major new features to be provided, so the configuration options have been changed.

While care has been taken to preserve backwards compatibility, it hasn't always been possible. Specifically, if you used the Ajax options in StateRestore 1, you must update to the new configuration options.

Furthermore, please note that StateRestore is now a DataTables Plus extension and requires a license, which can be purchased on this site, or you can start a trial on the download page.

New stateRestore option

Previously StateRestore was configured purely through the buttons, however, that could lead to conflicts and was too late in the initialisation cycle for a default state to be used. Therefore a new top level stateRestore option has been introduced to the DataTables configuration options. Here the StateRestore instance can be configured, including setting an Ajax end point, and defining what properties in a state should be stored.

If you previously had any configuration for StateRestore in your buttons, please now migrate it to stateRestore.

Button naming

The opportunity to update and harmonise the naming of the buttons that StateRestore makes available has been updated. However, aliases are provided to the old names, so you don't need to update the names if you wish to continue using them as was. The following buttons are provided, with their aliases:

Name Legacy name Description
stateCreate createState Create a new state
statesList savedStates Show a dropdown with a list of states
statesRemoveAll removeAllStates Delete all states

Please note that StateRestore 2 adds a new statesTable button, which doesn't have an alias as there was no equivalent in v1. Furthermore, StateRestore 2 does not provide sub-button types - they are handled automatically for the split drop down.

API

The StateRestore methods available via the DataTables API remain as they were are are backwards compatible, with the API extended to fill in the missing gaps (e.g. stateRestore.state().details() to read a state is new).