1
0
mirror of https://github.com/DataTables/DataTables.git synced 2025-03-15 16:29:16 +01:00

New: new data() method

- It is possible at the moment to use rows().data() to get the data for
  the table, you can use rows().data( { order: 'index' } ); to get the
  data in index order - I suspect a reasonably common use when working
  with the data set (at least, I use it that way!) and its a but clumsy
  to write that way, particularly compared to the old fnGetData method.
  So the new data() method is a short cut for `rows().data( { order:
  'index' } ).flatten()` to get the data set for the host table(s).
This commit is contained in:
Allan Jardine 2013-05-23 21:58:44 +01:00
parent 8e583a51b3
commit 01cc744b00

View File

@ -42,6 +42,13 @@ _api.register( 'settings()', function () {
} ); } );
_api.register( 'data()', function () {
return this.iterator( 'table', function ( settings ) {
return _pluck( settings.aoData, '_aData' );
} ).flatten();
} );
_api.register( 'destroy()', function ( remove ) { _api.register( 'destroy()', function ( remove ) {
remove = remove || false; remove = remove || false;