button.searchBuilder
Button that is enabled when SearchBuilder is to be used through a button.
Please note - this property requires the SearchBuilder extension for DataTables.
Description
When working with SearchBuilder you will typically wish to configure SearchBuilder options to customise either appearance or functionality.
By providing an config object buttons.buttons.config the SearchBuilder within the button can be customised as desired. The config object is structured in the same way as the SearchBuilder config object is normally.
SearchBuilder makes use of the following buttons properties.
buttons.buttons.text- This can be configured using thesearchBuilder.buttonoption of the DataTableslanguageobject, or using thebuttons.buttons.textoption for this button.buttons.buttons.init- Initialises the SearchBuilder.buttons.buttons.action- Displays the SearchBuilder floating above the table with focus on them.buttons.buttons.config- Sets the config for SearchBuilder in the same way as normal for the SearchBuilder config.
Example
SearchBuilder Button initialisation: Set the config for SearchBuilder to set the depthLimit option:
new DataTable('#myTable', {
layout: {
topStart: {
buttons: [
{
extend: 'searchBuilder',
config: {
depthLimit: 2
}
}
]
}
}
});Related
The following options are directly related and may also be useful in your application development.