diff --git a/packages/react/src/components/PaginationNav/PaginationNav-test.js b/packages/react/src/components/PaginationNav/PaginationNav-test.js index 7d9bd7520b01..8e6072c62193 100644 --- a/packages/react/src/components/PaginationNav/PaginationNav-test.js +++ b/packages/react/src/components/PaginationNav/PaginationNav-test.js @@ -111,5 +111,11 @@ describe('PaginationNav', () => { expect(screen.getByText('4')).toHaveAttribute('aria-current', 'page'); }); + + it('should not hide page 1 when active page is 0', () => { + render(); + + expect(screen.getByText('1')).toBeInTheDocument(); + }); }); }); diff --git a/packages/react/src/components/PaginationNav/PaginationNav.tsx b/packages/react/src/components/PaginationNav/PaginationNav.tsx index 5bf29ceda2cc..4ad8b7afe8d8 100644 --- a/packages/react/src/components/PaginationNav/PaginationNav.tsx +++ b/packages/react/src/components/PaginationNav/PaginationNav.tsx @@ -383,7 +383,8 @@ const PaginationNav = React.forwardRef( function pageWouldBeHidden(page: number) { const startOffset = itemsDisplayedOnPage <= 4 && page > 1 ? 0 : 1; - const wouldBeHiddenInFront = page >= startOffset && page <= cuts.front; + const wouldBeHiddenInFront = + (page >= startOffset && page <= cuts.front) || page === 0; const wouldBeHiddenInBack = page >= totalItems - cuts.back - 1 && page <= totalItems - 2;