File: searchDelay.xml

package info (click to toggle)
datatables.js 1.10.21%2Bdfsg-2%2Bdeb11u1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 22,604 kB
  • sloc: javascript: 64,254; xml: 10,441; php: 4,623; sh: 523; makefile: 21
file content (39 lines) | stat: -rw-r--r-- 2,049 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?xml version="1.0" encoding="UTF-8" ?>
<dt-option group="option">
	<name>searchDelay</name>
	<summary>Set a throttle frequency for searching</summary>
	<since>1.10.3</since>

	<type type="integer" />
	<default value="null">
		When given as `null` DataTables will automatically assign a value that is suitable for the processing mode that the DataTable is operating in:

		* Instant - client-side processing
		* 400mS - server-side processing
	</default>

	<description>
		The built-in DataTables global search (by default at the top right of every DataTable) will instantly search the table on every keypress when in client-side processing mode and reduce the search call frequency automatically to 400mS when in server-side processing mode. This call frequency (throttling) can be controlled using the `dt-init searchDelay` parameter for both client-side and server-side processing.

		Being able to control the call frequency has a number of uses:

		* Older browsers and slower computers can have their processing load reduced by reducing the search frequency
		* Fewer table redraws while searching can be less distracting for the user
		* Reduce the load on the server when using server-side processing by making fewer calls
		* Conversely, you can speed up the search when using server-side processing by reducing the default of 400mS to instant (`0`).

		As with many other parts of DataTables, it is up to yourself how you configure it to suit your needs!

		The value given for `dt-init searchDelay` is in milliseconds (mS).

		Please note that this option effects only the built in global search box that DataTables provides. It does not effect the `dt-api search()` or `dt-api column().search()` methods at all. If you wish to be able to throttle calls to those API methods use the utility method `dt-api $.fn.dataTable.util.throttle()`.
	</description>

	<example title="Set a 350mS throttle for searching"><![CDATA[
$('#example').DataTable( {
  searchDelay: 350
} );
]]></example>

	<related type="option">search</related>
</dt-option>