Option for pagination to neglect hidden rows?
Option for pagination to neglect hidden rows?
dvnlgls
Posts: 5Questions: 0Answers: 0
It would be nice to have the option of pagination to ignore hidden rows. Currently if I have a table of 100 rows, of which 50 are hidden and I display 10 rows/page, there will be 10 pages. If this feature is present I'd be seeing only 5 pages.
Example scenario. Consider a table that displays many records. Each record may contain a class: "active" or "inactive". By default I want to show only rows with "active" class. So I hide the inactive ones and apply datatable. Now upon a button click, I want to hide the active rows and show inactive rows. I'd use JS to achieve that and apply datatable again.
I've a workaround as of now but if many people want such a feature, do consider. Thanks.
Example scenario. Consider a table that displays many records. Each record may contain a class: "active" or "inactive". By default I want to show only rows with "active" class. So I hide the inactive ones and apply datatable. Now upon a button click, I want to hide the active rows and show inactive rows. I'd use JS to achieve that and apply datatable again.
I've a workaround as of now but if many people want such a feature, do consider. Thanks.
This discussion has been closed.
Replies
Having a built-in check on display:none on every single row would be horribly slow since DataTables would need to check what the display status of every row is. If you are prepared to take that this, then a filtering plug-in, as I mentioned above, will work just fine.
Allan
Allan