Open Javier-Rotelli opened 9 years ago
if you turn off bPaginate (->setOptions(['bPaginate'=>false]); the collection engine will skip the las row in the collection.
->setOptions(['bPaginate'=>false]);
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
iDisplayLength
-1
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
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#L137I'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