Since: StateRestore 1.0.0

Enable/Disable the creation of new states.
Please note - this property requires the StateRestore extension for DataTables.


This option allows for the creation of states to be enabled or disabled.

As default the value is true, meaning that states can be created. If this option is set to false, then creation will be disabled.

It is also worth noting that if stateRestore.save is set to false, the value set here will be overruled. This is because creation is a form of saving, and is therefore disabled when that option is.

Take a look at this example to see this in action. In this example the configuration takes place in the savedStates button. This is because we want to block creation via the api, without having to show the createState button.




true if creation is to be enabled, false if not.


  • Value: true

The default value for the stateRestore.create option is true meaning that as standard creation of new states will be enabled.


Disable creation of new states:

    dom: 'Blfrtip',
        extend: 'savedStates',
        config: {
            create: false