language.stateRestore.creationModal
Set the text for the elements that are shown within the creation modal.
Please note - this property requires the StateRestore extension for DataTables.
Description
This is an object that contains all of the language options needed to fully customise the creation modal. All language options within the object are passed through the i18n()
function.
Type
object
- Description:
An object containing all of the strings that are used within the creation modal (enabled using
stateRestore.creationModal
).
Default
- Value:
object
The default value for this language option is an object containing strings that allow for internationalisation of all of the text within the creation modal. The default for this object is as follows.
{
button: 'Create',
columns: {
search: 'Column Search:',
visible: 'Column Visibility:'
},
length: 'Page Length:'
name: 'Name:',
order: 'Sorting:',
paging: 'Paging:',
scroller: 'Scroll Position:',
search: 'Search:',
searchBuilder: 'SearchBuilder:',
searchPanes: 'SearchPanes:',
select: 'Select:',
title: 'Create New State',
}
Example
Change text of the columns search checkbox label:
new DataTable('#myTable', {
language: {
stateRestore: {
creationModal: {
columns: {
visible: 'Visible Columns:'
}
}
}
},
layout: {
topStart: {
buttons: [
{
extend: 'createState',
config: {
creationModal: true,
toggle: {
columns: {
visible: true
}
}
}
},
'savedStates'
]
}
}
});
Related
The following options are directly related and may also be useful in your application development.