searchBuilder.enterSearch
Trigger a search on the enter key rather than every keypress.
Please note - this property requires the SearchBuilder extension for DataTables.
Deprecated!
As of v1.2.0 this feature has been deprecated. This feature has not yet been scheduled for removal, but its use is discouraged and the alternatives discussed below should be used.
Description
This option allows for searches not to be triggered until the enter key is pressed when using conditions with input elements. This will happen when searchBuilder.enterSearch
is set to true.
As default this option's value is false, meaning that a search is triggered on every input to an input element.
The only exception to this is when using a date picker. Here selecting a date in the date picker will trigger a search without enter being pressed, regardless of the value of this option.
Take a look at this example to see this in action.
Please note: SearchBuilder 1.2.0 coincided with the release of DataTables 1.11.0 which introduced search.return
. This made this option void and it was therefore deprecated. For now this option will continue to be supported, however it will be removed in the future. We encourage you to move instead to search.return
.
Type
boolean
- Description:
When true an enter keypress is required to trigger a search for an input element.
Default
- Value:
false
The default value for this option is false meaning that as standard a search will occur on every input into an input element.
Example
Input searches to only occur on enter press:
new DataTable('#myTable', {
layout: {
top1: {
searchBuilder: {
enterSearch: true
}
}
}
});