mirror of
https://github.com/DataTables/DataTables.git
synced 2025-02-19 17:54:14 +01:00
New: cache() methods for rows and cells.
- I'd previously added columns().cache() which gets the cached information about filtering or sorting, but this rounds the API off, extending that also to rows and cells: - rows().cache() - row().cache() - cells().cache() - cell().cache()
This commit is contained in:
parent
b75147b994
commit
78e4d32e30
@ -1 +1 @@
|
||||
5e444c7e09126c87965e69873fc5152fd097014b
|
||||
3d7f4f017ebe45834c414111774745d57168d4b9
|
||||
|
14
media/js/jquery.dataTables.js
vendored
14
media/js/jquery.dataTables.js
vendored
@ -7367,6 +7367,11 @@
|
||||
} );
|
||||
} );
|
||||
|
||||
_api.registerPlural( 'rows().cache()', 'row().cache()', function ( type ) {
|
||||
return this.iterator( 'row', function ( settings, row ) {
|
||||
return type === 'filter' ? row._aFilterData : row._aSortData;
|
||||
} );
|
||||
} );
|
||||
|
||||
_api.registerPlural( 'rows().invalidate()', 'row().invalidate()', function ( src ) {
|
||||
return this.iterator( 'row', function ( settings, row ) {
|
||||
@ -7901,6 +7906,15 @@
|
||||
} );
|
||||
|
||||
|
||||
_api.registerPlural( 'cells().cache()', 'cell().cache()', function ( type ) {
|
||||
type = type === 'filter' ? '_aFilterData' : '_aSortData';
|
||||
|
||||
return this.iterator( 'cell', function ( settings, row, column ) {
|
||||
return settings.aoData[ row ][ type ][ column ];
|
||||
} );
|
||||
} );
|
||||
|
||||
|
||||
_api.registerPlural( 'cells().index()', 'cell().index()', function () {
|
||||
return this.iterator( 'cell', function ( settings, row, column ) {
|
||||
return {
|
||||
|
Loading…
x
Reference in New Issue
Block a user