1
0
mirror of https://github.com/DataTables/DataTables.git synced 2025-02-19 17:54:14 +01:00

Fixed: The instance that is stored (oSettings.oInstance) could contain muliple tables in a single instance, when tables are created with a selector that includes multiple tables. This could make API access a bit more tricky (3963) so now store a unique instance of the DataTables object for each individual instance.

This commit is contained in:
Allan Jardine 2011-01-29 08:53:42 +00:00
parent e2f8a1375a
commit 6641866868

View File

@ -6441,12 +6441,14 @@
return;
}
/* Store 'this' in the settings object for later retrieval */
oSettings.oInstance = _that;
/* Set the table node */
oSettings.nTable = this;
/* Keep a reference to the 'this' instance for the table. Note that if this table is being
* created with others, we retrieve a unique instance to ease API access.
*/
oSettings.oInstance = _that.length == 1 ? _that : $(this).dataTable();
/* Bind the API functions to the settings, so we can perform actions whenever oSettings is
* available
*/