feat(pagination): implement windowed pagination for improved navigation

- Introduced windowed pagination logic in the TendersTable component to enhance user experience by allowing for a more manageable view of pages.
- Updated the pagination component to accept new props for page range and margin pages, enabling customizable pagination display.
- Refactored the useTenderListPresenter to utilize the new windowed pagination functionality, improving clarity and maintainability of pagination handling.
This commit is contained in:
AmirReza Jamali
2026-05-18 15:28:07 +03:30
parent 7b63b2a6f3
commit fc53d6b556
3 changed files with 57 additions and 4 deletions
+4
View File
@@ -42,6 +42,7 @@ const TendersTable = () => {
navigateToTenderDetails,
navigateToTenderFeedback,
handlePaginationChange,
buildWindowedPageLabel,
getRowNumber,
formatDateTimeCell,
pagination,
@@ -157,6 +158,9 @@ const TendersTable = () => {
currentPage={pagination.currentPage}
totalPages={pagination.totalPages}
onPageChange={handlePaginationChange}
pageRangeDisplayed={3}
marginPagesDisplayed={1}
pageLabelBuilder={buildWindowedPageLabel}
/>
</IsVisible>
</ListWrapper>