Problem with a pagination.
Problem with a pagination.
lankmiler
Posts: 5Questions: 1Answers: 0
Hello there.
I have one problem with a pagination. When some of items are hidden - it calculates it and creates a "page" for it. Is there a way to fix it? I want to make right pagination for it and i'll have a functionality for it - checkbox that will hide/show items on change, but with "calculating" pagination.
This discussion has been closed.
Answers
or maybe it's wrong way to do it...
Anyway - i want to do this feature, so i'll be very grateful for help with it
No - DataTables will not take account of
display: none
on an HTMLtr
element.If you want to remove items from the page, search is how you do it in DataTables. You can create your own plug-ins if you need to apply a logic condition to each row.
Allan
One element is hidden and it makes one page more. When it must be 2 here. You can see it at shared link.
So there is no available functions to do those actions? I want just hide them and show after. But with right pagination
No, as I mentioned above DataTables will not take account of
display: none
rows.Allan
So why there is 3 pages when it must be 2. 2 items per page, 5 in total but 1 is hidden. It must be 3 if that 1 will be shown. But id wasn't
And it writes "Showing 1 to 2 of 5 entries". When it's 4 in total(without hidden) and it's one element at page, not 2
Because DataTables counts the hidden row. Even if it isn't actually visible on the page (because you've hidden it!) there is still a node there and DataTables still counts it.
As I said before, DataTables does not take account of the
display: none
rows.