1
0
mirror of https://github.com/DataTables/DataTables.git synced 2025-02-20 18:54:15 +01:00

New: cell-selector type can now 'self-select' by supporting the index

objects that it uses internally for cells.
This commit is contained in:
Allan Jardine 2014-02-21 17:20:20 +00:00
parent 23c9580d01
commit a14bfa29fb
2 changed files with 13 additions and 3 deletions

View File

@ -1 +1 @@
7d0178b4e2ee783a51dffcbdddf26743685fe74c
200867a517bb0090f102b7d61f5420912d65f633

View File

@ -8043,6 +8043,9 @@
return a;
}
else if ( $.isPlainObject( s ) ) {
return [s];
}
// jQuery filtered cells
return allCells.filter( s ).map( function (i, el) {
@ -8062,8 +8065,15 @@
_api_register( 'cells()', function ( rowSelector, columnSelector, opts ) {
// Argument shifting
if ( $.isPlainObject( rowSelector ) ) {
opts = rowSelector;
rowSelector = null;
// If passing in a cell index
if ( rowSelector.row ) {
opts = columnSelector;
columnSelector = null;
}
else {
opts = rowSelector;
rowSelector = null;
}
}
if ( $.isPlainObject( columnSelector ) ) {
opts = columnSelector;