-
-
Notifications
You must be signed in to change notification settings - Fork 14
/
events.xml
42 lines (31 loc) · 1.15 KB
/
events.xml
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
<?xml version="1.0" encoding="UTF-8" ?>
<dt-example table-type="html" table-class="display nowrap" order="4">
<css lib="datatables autofill" />
<js lib="jquery datatables autofill">
<![CDATA[
var table = $('#example').DataTable({
autoFill: true,
});
table.on('autoFill', function () {
table.columns.adjust();
});
]]>
</js>
<js-vanilla>
<![CDATA[
var table = new DataTable('#example', {
autoFill: true,
});
table.on('autoFill', function () {
table.columns.adjust();
});
]]>
</js-vanilla>
<title lib="AutoFill">Events</title>
<info><![CDATA[
AutoFill will emit events that can be listened for to take action when the user has completed a fill action. The events emitted by AutoFill are:
* `af-event preAutoFill` - Emitted prior to the data update, but after the drag has been completed
* `af-event autoFill` - Emitted immediately after the table has been updated with the new data.
This example shows the `af-event autoFill` event being listened for to adjust the table's column sizes to suit the new data. Although this is a trivial example, this listener can be used to perform other updates such as writing the filled data to a database.
]]></info>
</dt-example>