How do I keep the table height fixed when using pagination?
How do I keep the table height fixed when using pagination?
Let's say I have 32 entries in my table, and my page size is 10. When the user clicks the Next button 3 times, he gets to a page with only 2 entries in it, and the table height shrinks dynamically. My users don't like that because the paging buttons and the elements below the table move, so it causes their mouse to no longer be in an expected location. Is it possible to make the last page of entries maintain the same height, even if there are less entries on that page than it can accomodate? Basically, keeping the pagination buttons in the exact same location regardless of which page you are on.
I am using DataTables 1.9.
Thanks in advance,
David
Answers
You can set the datatable to a fixed height by using the ScrollY property: https://datatables.net/reference/option/scrollY
Frank