diff --git a/apps/client/src/widgets/collections/Pagination.css b/apps/client/src/widgets/collections/Pagination.css index d2acef6453..af18d9d84f 100644 --- a/apps/client/src/widgets/collections/Pagination.css +++ b/apps/client/src/widgets/collections/Pagination.css @@ -61,7 +61,6 @@ @container note-list-pager (max-width: 550px) { .note-list-pager-page-button-container, .note-list-pager-total-count { - background: red; display: none; } diff --git a/apps/client/src/widgets/collections/Pagination.tsx b/apps/client/src/widgets/collections/Pagination.tsx index 8096ab2a36..9c389902cd 100644 --- a/apps/client/src/widgets/collections/Pagination.tsx +++ b/apps/client/src/widgets/collections/Pagination.tsx @@ -28,7 +28,7 @@ export function Pager({ page, pageSize, setPage, pageCount, totalNotes }: Omit

{setPage(page - 1)}} + onClick={() => setPage(page - 1)} /> @@ -40,7 +40,7 @@ export function Pager({ page, pageSize, setPage, pageCount, totalNotes }: Omit

{setPage(page + 1)}} + onClick={() => setPage(page + 1)} />

@@ -77,6 +77,8 @@ function PageButtons(props: PageButtonsProps) { middleStart = Math.min(middleStart, rightStart - middleLength); const totalButtonCount = leftLength + middleLength + rightLength; + const hasLeadingEllipsis = (middleStart - leftLength > 1); + const hasTrailingEllipsis = (rightStart - (middleStart + middleLength - 1) > 1); return
{[ ...createSegment(leftStart, leftLength, props.page, props.setPage, false), - ...createSegment(middleStart, middleLength, props.page, props.setPage, (middleStart - leftLength > 1)), - ...createSegment(rightStart, rightLength, props.page, props.setPage, (rightStart - (middleStart + middleLength - 1) > 1)), + ...createSegment(middleStart, middleLength, props.page, props.setPage, hasLeadingEllipsis), + ...createSegment(rightStart, rightLength, props.page, props.setPage, hasTrailingEllipsis), ]}
; }