File: stateLoaded.xml

package info (click to toggle)
datatables.js 1.11.5%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 22,848 kB
  • sloc: javascript: 65,075; xml: 10,712; php: 4,741; sh: 544; makefile: 18
file content (45 lines) | stat: -rw-r--r-- 1,755 bytes parent folder | download | duplicates (6)
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
40
41
42
43
44
45
<?xml version="1.0" encoding="UTF-8" ?>
<dt-option group="callback">
	<name>stateLoaded</name>
	<summary>State loaded callback.</summary>
	<since>1.10</since>

	<type type="function">
		<signature>stateLoaded( settings, data )</signature>
		<parameter type="DataTables.Settings" name="settings">
			DataTables settings object
		</parameter>
		<parameter type="object" name="data">
			Data to save. The data comes from `dt-init stateSaveParams`
		</parameter>
		<scope>HTML table element</scope>
	</type>

	<description>
		Callback that is fired once the state has been loaded (`dt-init stateLoadCallback`) and the saved data manipulated (if required - `dt-init stateLoadParams`).

		This callback is useful if you simply wish to know information from the saved state, without getting into the inner workings of where and how the state information has been saved. For example it can be useful for populating custom filter inputs.
	</description>

	<example title="Display the saved global filter"><![CDATA[
$('#example').dataTable( {
  "stateSave": true,
  "stateLoaded": function (settings, data) {
    alert( 'Saved filter was: '+data.search.search );
  }
} );
]]></example>

	<related type="api">state()</related>
	<related type="api">state.clear()</related>
	<related type="api">state.loaded()</related>
	<related type="api">state.save()</related>
	<related type="option">stateSave</related>
	<related type="option">stateSaveCallback</related>
	<related type="option">stateLoadParams</related>
	<related type="option">stateLoaded</related>
	<related type="option">stateSaveParams</related>
	<related type="option">stateLoadCallback</related>
	<related type="event">stateLoadParams</related>
	<related type="event">stateSaveParams</related>
</dt-option>