{hero}

searchBuilder.liveSearch

Since: SearchBuilder 1.6.0

Control live search operation.
Please note - this property requires the SearchBuilder extension for DataTables.

Description

By default SearchBuilder will automatically redraw the DataTable and apply its search terms on every user input action (e.g. typing or selecting options from a dropdown) - we term this live searching. This might not always be desirable, particularly when working with large data sets which can take a significant amount of time to process the search criteria.

This option can be used to disable the live search operation of SearchBuilder and instead add a Search button to the interface. Triggering of this button will cause the table to perform the search operation setup by the SearchBuilder criteria.

Please note that with this option enabled if you setup a search, any action that causes the host DataTable to redraw will trigger a search. This includes using the built in global search, ordering or paging.

Type

boolean

Description:

Enable live search on SearchBuilder input (true), or disable and show a "Search" button to trigger the search operation (false).

Default

  • Value: true

Search will automatically happen as the user inputs values.

Example

Disable live search:

new DataTable('#myTable', {
	layout: {
		top1: {
			searchBuilder: {
				liveSearch: false
			}
		}
	}
});