button.searchPanes
Enable SearchPanes through a button.
Please note - this property requires the SearchPanes extension for DataTables.
Description
When working with SearchPanes you will typically wish to configure SearchPanes options to customise either appearance or functionality.
By providing an config
object buttons.buttons.config
the SearchPanes within the button can be customised as desired. The config
object is structured in the same way as the SearchPanes config Object is normally.
SearchPanes makes use of the following Buttons properties.
buttons.buttons.text
- This can be configured using thesearchPanes.collapse
option of the DataTableslanguage
object, or using thebuttons.buttons.text
option for this button.buttons.buttons.init
- Initialises the SearchPanes.buttons.buttons.action
- Displays the SearchPanes floating above the table with focus on them.buttons.buttons.config
- Sets the config for SearchPanes in the same way as normal for the SearchPanes config.
Example
SearchPanes Button initialisation: Set the config for SearchPanes to enable the cascadePanes
option:
new DataTable('#myTable', {
layout: {
topStart: {
buttons: [
{
extend: 'searchPanes',
config: {
cascadePanes: true
}
}
]
}
}
});