{hero}

stateRestore.rename

Since: StateRestore 1.0.0

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

Description

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

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

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

Take a look at this example to see this in action.

Type

boolean

Description:

true if renaming states is to be enabled, false if not.

Default

  • Value: true

The default value for the stateRestore.rename option is true meaning that as standard renaming states will be enabled.

Example

Disable renaming of new states:

$('#example').DataTable({
    dom: 'Blfrtip',
    buttons:[
        'createState',
        {
            extend: 'savedStates',
            config: {
                rename: false
            }
        }
    ]
});