paginationjs icon indicating copy to clipboard operation
paginationjs copied to clipboard

return extra data when using ajax request?

Open morrow95 opened this issue 5 years ago • 0 comments

Using the example given in the docs... response is expected to be an array of results. Is there any way to return additional data along with this (not part of the result set) so that it can be accessed in the callback: function(data, pagination)? Preferably I would like to do something like data.results is my result set then have access to data.extra in the callback with my additional data.

     dataSource: function(done) {
        $.ajax({
            type: 'GET',
            url: '/test.json',
            success: function(response) {
                done(response);
            }
        });
     }

morrow95 avatar Sep 05 '20 05:09 morrow95