You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TableMixin and ListView both use the class variable paginate_by (and get_paginate_by method) to set the Pagintor.per_page attribute. However they have divergent behavior on handling pages that are out of bounds as well as when paginate_by is not set.
if paginate_by is NOT set:
ListView: Does not attempt to paginate
TableMixin: Uses a default of 25
if page is "out of bounds":
ListView: Does nothing since it is not attempting to paginate
TableMixin: Handles it gracfully and takes you to the last page instead
if paginate_by IS set:
ListView: Attempts Pagination
TableMixin: Also Attempts Pagination
if the page is "out of bounds":
ListView: Throws 404 error because of the empty page
TableMixin: Has no chance to handle gracefully because list view already threw 404 error
This cannot be the intended behavior, to have "out of bounds" pages handled differently depending on whether or not paginate_by was set.
Recommendation:
allow for a new name space. paginate_table_by and get_paginate_table_by that allows for the user to set per_page and continue to let TableMixin handle out of bounds pages gracefully.
The text was updated successfully, but these errors were encountered:
TableMixin and ListView both use the class variable
paginate_by
(andget_paginate_by
method) to set thePagintor.per_page
attribute. However they have divergent behavior on handling pages that are out of bounds as well as when paginate_by is not set.This cannot be the intended behavior, to have "out of bounds" pages handled differently depending on whether or not
paginate_by
was set.Recommendation:
allow for a new name space.
paginate_table_by
andget_paginate_table_by
that allows for the user to setper_page
and continue to letTableMixin
handle out of bounds pages gracefully.The text was updated successfully, but these errors were encountered: