Bug report - Pagination using bootstrap plugin and pipeline

Bug report - Pagination using bootstrap plugin and pipeline

LunaticPenguinLunaticPenguin Posts: 1Questions: 0Answers: 0

Hi,

I found two bugs on the pagination using boostrap plugin with datatable processing on server side using a pipeline (http://legacy.datatables.net/release-datatables/examples/server_side/pipeline.html).
The fix for the first bug is the following:

take a look here: http://legacy.datatables.net/plug-ins/pagination#functions

l. 12-13, currently we have:
"iTotalPages": oSettings._iDisplayLength === -1 ?
0 : Math.ceil( oSettings.fnRecordsDisplay() / oSettings._iDisplayLength )

but it must be:
"iTotalPages": oSettings._iDisplayLength === -1 ?
0 : Math.ceil( oSettings.fnRecordsTotal() / oSettings._iDisplayLength )

otherwise the pagination displays pages based on the pipe length.

The second bug is with the dynamic "aLengthMenu". If I add an entry -1 to get whole rows, I'm only getting a set of rows equals to (pipe length * iDisplayLength). So it isn't based on "iTotalRecords".

Have fun! :)

This discussion has been closed.