From 01cc744b004c73a1bac26da177d267116177fa5e Mon Sep 17 00:00:00 2001 From: Allan Jardine Date: Thu, 23 May 2013 21:58:44 +0100 Subject: [PATCH] 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). --- media/src/api/api.core.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/media/src/api/api.core.js b/media/src/api/api.core.js index 2615745c..24ee6aad 100644 --- a/media/src/api/api.core.js +++ b/media/src/api/api.core.js @@ -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 ) { remove = remove || false;