feat(tenders): enhance pagination functionality and styling

- Added absoluteCurrentPage to the useTenderListPresenter for better pagination state management.
- Updated the TendersTable component to utilize absoluteCurrentPage in the pagination key.
- Enhanced the Pagination component to support a new "tenders" variant for improved styling.
- Introduced custom styles for the active page in the tenders pagination, ensuring a distinct visual representation.
- Refactored the useHybridPagination hook to maintain accurate page tracking with cursor navigation.
This commit is contained in:
AmirReza Jamali
2026-05-20 15:48:29 +03:30
parent f080d51e63
commit f6eaac94c6
5 changed files with 144 additions and 33 deletions
+3
View File
@@ -46,6 +46,7 @@ const TendersTable = () => {
getRowNumber,
formatDateTimeCell,
pagination,
absoluteCurrentPage,
} = useTenderListPresenter();
return (
@@ -155,12 +156,14 @@ const TendersTable = () => {
</div>
<IsVisible condition={shouldShowPagination}>
<Pagination
key={`pagination-tenders-${absoluteCurrentPage}`}
currentPage={pagination.currentPage}
totalPages={pagination.totalPages}
onPageChange={handlePaginationChange}
pageRangeDisplayed={3}
marginPagesDisplayed={1}
pageLabelBuilder={buildWindowedPageLabel}
variant="tenders"
/>
</IsVisible>
</ListWrapper>
@@ -539,6 +539,7 @@ const useTenderListPresenter = () => {
getRowNumber,
formatDateTimeCell,
pagination: windowedPagination,
absoluteCurrentPage: pagination.currentPage,
};
};