mirror of
https://github.com/DataTables/DataTables.git
synced 2025-03-15 16:29:16 +01:00
Dev fix: row().node() should return null or the row element
- It wasn't with the registerPural API method because the function was returning undefined, which tells the wrapper to use the Api instance
This commit is contained in:
parent
2d3c29a9d5
commit
d65130ec4f
@ -1 +1 @@
|
||||
5d035215dcd0b65bde70c00de28bcbc3154bb447
|
||||
856167bc79ad1c3e74ca0cd811aa0dbebe51b410
|
||||
|
15
media/js/jquery.dataTables.js
vendored
15
media/js/jquery.dataTables.js
vendored
@ -7488,14 +7488,12 @@
|
||||
} );
|
||||
|
||||
|
||||
_api_registerPlural( 'rows().nodes()', 'row().node()' , function () {
|
||||
_api_register( 'rows().nodes()', function () {
|
||||
return this.iterator( 'row', function ( settings, row ) {
|
||||
// use pluck order on an array rather - rows gives an array, row gives it individually
|
||||
return settings.aoData[ row ].nTr || undefined;
|
||||
} );
|
||||
} );
|
||||
|
||||
|
||||
_api_register( 'rows().data()', function () {
|
||||
return this.iterator( true, 'rows', function ( settings, rows ) {
|
||||
return _pluck_order( settings.aoData, rows, '_aData' );
|
||||
@ -7515,14 +7513,12 @@
|
||||
} );
|
||||
} );
|
||||
|
||||
|
||||
_api_registerPlural( 'rows().indexes()', 'row().index()', function () {
|
||||
return this.iterator( 'row', function ( settings, row ) {
|
||||
return row;
|
||||
} );
|
||||
} );
|
||||
|
||||
|
||||
_api_registerPlural( 'rows().remove()', 'row().remove()', function () {
|
||||
var that = this;
|
||||
|
||||
@ -7611,6 +7607,15 @@
|
||||
} );
|
||||
|
||||
|
||||
_api_register( 'row().node()', function () {
|
||||
var ctx = this.context;
|
||||
|
||||
return ctx.length && this.length ?
|
||||
ctx[0].aoData[ this[0] ].nTr || null :
|
||||
null;
|
||||
} );
|
||||
|
||||
|
||||
_api_register( 'row.add()', function ( row ) {
|
||||
// Allow a jQuery object to be passed in - only a single row is added from
|
||||
// it though - the first element in the set
|
||||
|
Loading…
x
Reference in New Issue
Block a user