Renamed the is_needed property to is_paged in the Pagination utility.

This commit is contained in:
2023-02-04 10:26:28 +08:00
parent 511328a0bd
commit 8be44ccf5f
3 changed files with 12 additions and 12 deletions

View File

@ -88,7 +88,7 @@ class Pagination(t.Generic[T]):
self.__total_pages: int = 0 if len(items) == 0 \
else int((len(items) - 1) / self.page_size) + 1
"""The total number of pages."""
self.is_needed: bool = self.__total_pages > 1
self.is_paged: bool = self.__total_pages > 1
"""Whether there should be pagination."""
self.__default_page_no: int = 0
"""The default page number."""