Skip to content
This repository has been archived by the owner on Apr 17, 2019. It is now read-only.

Collection engine skips the last row when using bPaginate => false #346

Open
Javier-Rotelli opened this issue Oct 16, 2015 · 0 comments
Open

Comments

@Javier-Rotelli
Copy link

if you turn off bPaginate (->setOptions(['bPaginate'=>false]);
the collection engine will skip the las row in the collection.

this is because when pagination is off, datables will pass the parameter iDisplayLength with a value of -1
wich then gets passed to the engine, resulting in a slice of the collection removing the last item.
here
https://github.com/Chumper/Datatable/blob/master/src/Chumper/Datatable/Engines/CollectionEngine.php#L81
and here
https://github.com/Chumper/Datatable/blob/master/src/Chumper/Datatable/Engines/CollectionEngine.php#L137

I'm working on it, i have a failing test for this bug, and a solution, but before I do a pull request i'd like to fix #341

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

No branches or pull requests

1 participant