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
|
<?xml version="1.0" encoding="UTF-8" ?>
<dt-api group="utility">
<name>concat()</name>
<summary>Combine multiple API instances to create a single new instance.</summary>
<since>1.10</since>
<type type="function">
<signature>concat( a [, b [, ... ] ] )</signature>
<description>Concatenate two or more API instances together</description>
<parameter type="DataTables.Api" name="a">
API instance to concatenate to the initial instance.
</parameter>
<parameter type="DataTables.Api" name="b" default="">
Additional API instance(s) to concatenate to the initial instance.
</parameter>
<returns type="DataTables.Api">New API instance with the values from all pass in instances concatenated into its result set.</returns>
</type>
<description>
The `dt-api concat()` method will combine the result set of two or more DataTables API instances into a single API instance.
This method makes use of the fact that DataTables API objects are "array like", in that they inherent a lot of the abilities and methods of the Javascript `Array` type. In this case, this method is a proxy for the Javascript `Array.prototype.concat` method and is provided as a utility method for the DataTables API. For more information about the original method, please refer to the [Mozilla MDN documentation for `concat`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/concat).
</description>
<example title="Concat data from two sources"><![CDATA[
var table = $('#example').DataTable();
var data = table.column( 0 ).data()
.concat( table.column( 1 ).data );
]]></example>
</dt-api>
|