button.searchBuilder

Since: SearchBuilder 1.0.0

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 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 for its Button:

  • text - This can be configured using the searchBuilder.button option of the DataTables language object, or using the buttons.buttons.text option for this button.
  • init - Initialises the SearchBuilder.
  • action - Displays the SearchBuilder floating above the table with focus on them.
  • 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 searchBuilder.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.