search.return
Enable / disable DataTables' search on return.
Description
This initialisation option allows the number of searches to be reduced. When this option is set to true
, searches will only occur when the return key is pressed and focus is on the searchbox. This is particularly useful when working with large datasets or server-side processing. The default value for this option is false
meaning that a search will occur on every keypress when the searchbox is focussed.
Type
This option can be given in the following type(s):
Default
- Value:
false
Example
Enable search on return:
new DataTable('#myTable', {
search: {
return: true
}
});
Related
The following options are directly related and may also be useful in your application development.