stateRestore.sharing
Allow the end user to share states (or not).
Please note - this property requires the StateRestore extension for DataTables.
Description
When using an Ajax data store (stateRestore.ajax), StateRestore provides the ability for a user to share a state that they have created with others. This is done by setting a property in the state edit modal.
It is worth noting that other users who are using a shared state have only the ability to load the state or duplicate it. They will not have the ability to edit states shared by others, or set them as defaults (since that is part of the editing process).
Type
boolean
This option can be provided as a boolean value:
true- The end user can share states with othersfalse- The end user cannot share states.
Default
- Value:
true
The user is allowed to flag a state as shared (note that it requires stateRestore.ajax to be set as well).
Example
Disallow the end user from sharing states.:
new DataTable('#myTable', {
layout: {
topStart: {
buttons: ['stateCreate', 'statesList', 'pageLength']
}
},
stateRestore: {
ajax: '/states/myTable',
sharing: false
}
});