1
0
mirror of https://github.com/DataTables/DataTables.git synced 2025-01-19 12:52:11 +01:00

Dev: Add the ability to get a settings object from an API instance

This commit is contained in:
Allan Jardine 2014-01-31 13:22:42 +00:00
parent d4bbef72ba
commit 0e974f27e6
2 changed files with 5 additions and 1 deletions

View File

@ -1 +1 @@
afe19cd214391b3408a6c0cb2c38163d71c183cc
5d76c047878c0b74ad3adc7a0d135cbbb10eb9b4

View File

@ -6349,6 +6349,7 @@
* * `node` - `TABLE` node which has already been formed into a DataTable.
* * `jQuery` - A jQuery object of `TABLE` nodes.
* * `object` - DataTables settings object
* * `DataTables.Api` - API instance
* @return {array|null} Matching DataTables settings objects. `null` or
* `undefined` is returned if no matching DataTable is found.
* @ignore
@ -6370,6 +6371,9 @@
idx = $.inArray( mixed, tables );
return idx !== -1 ? [ settings[idx] ] : null;
}
else if ( mixed && typeof mixed.settings === 'function' ) {
return mixed.settings();
}
else if ( typeof mixed === 'string' ) {
// jQuery selector
jq = $(mixed);