Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Datatable only returns 10 rows #192

Open
longestdrive opened this issue Jan 27, 2015 · 2 comments
Open

Datatable only returns 10 rows #192

longestdrive opened this issue Jan 27, 2015 · 2 comments
Labels

Comments

@longestdrive
Copy link

Hi
I'm having problems with the package. I've updated to the latest version today.

My query only pulls off the first 10 rows of data. My datatable has bServerside set to false and I should get over 200 rows returned.

If I set datatable to bServiside to true I can paginate through the 200 rows as expected.

It's as if the package is limiting the records being returned, here's my set up:

$members = Websiteuser::select(
        'users.id',
        DB::raw("CONCAT_WS(' ' , users.first_name, users.last_name) as name"),
        'users.email',
        'users.valid_member',
        'users.activated',
        'users.site_editor',
        'users.disabled'
        );

// dd($members->toSql());
$members_datatable = Datatables::of($members)->make()

What am I doing wrong?

@longestdrive
Copy link
Author

Tracked the issue down. I was previously using version 1.4.1, since then you have added defaults in the method processdata so that if IdisplayLength is not set you default to 10 - is there a reason for this?
To overcome I set iDisplayLength in my jquery initialisation to 999999 to ensure full data set is received. - seems to defeat the object of zero configuration? - However this then corrupts as I then get a full data set in the datatable without pagination.

Will revert to 1.4.1 for now

Is there a reason for the change that I'm missing?

I'm using datatables 1.10 and Laravel 4.2

@naude
Copy link

naude commented Feb 19, 2015

I did a composer update today
"laravel/framework": "~4.2.11",
"bllim/datatables": "*",
to get beanstalk going and then i noted all my ajax datatables only display 10 records and no longer honored my custom iDisplayLength: 50, even though the ajax Serverside returns 130 records (3 tabs with bootstrap pagination)

Tables that dont use ajax were sill working.

I then added this to the table blade
"bServerSide": true
and its working again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants