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