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:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user