Skip to content

enhance Pagination with first/last controls and result summary - #460

Merged
mikewheeleer merged 1 commit into
Agentpay-Org:mainfrom
mysterio123865:enhancement/components-pagination-controls
Jul 28, 2026
Merged

enhance Pagination with first/last controls and result summary#460
mikewheeleer merged 1 commit into
Agentpay-Org:mainfrom
mysterio123865:enhancement/components-pagination-controls

Conversation

@mysterio123865

@mysterio123865 mysterio123865 commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

The summary:

  • Updates automatically as the page changes.
  • Correctly handles the first and last pages.
  • Calculates the displayed item range from the current page.
  • Is announced through an ARIA live region so screen reader users receive updates whenever pagination changes.

🔹 Preserved Existing Behavior

The enhancement remains fully backward compatible.

  • Existing usages continue to work without modification.
  • The component still renders nothing when pageCount <= 1.
  • New functionality is enabled only when the additional props are supplied.

Documentation

Updated docs/components.md to document:

  • showFirstLast
  • totalItems
  • pageSize

including their behavior and intended usage.


Testing

Expanded the component test suite to validate the new functionality, including:

  • First button navigation.
  • Last button navigation.
  • Disabled states.
  • Result summary rendering.
  • Live-region updates.
  • Existing pagination behavior remains unchanged.

Verification

  • ✅ 34 tests passing
  • ✅ 100% coverage for Pagination.tsx
  • ✅ Build succeeds
  • ✅ Lint passes for all modified files (repository-wide lint issues are pre-existing and unrelated to this change)

Notes

The changes are currently uncommitted and ready for review.

Tracking: Closes #299

@mysterio123865 mysterio123865 changed the title add stuck trade refund countdown and recovery guidance (Closes #241) enhance Pagination with first/last controls and result summary Jul 28, 2026
@mikewheeleer

Copy link
Copy Markdown
Contributor

clean work @mysterio123865 — does exactly what #299 asked. merging 🎉

@mikewheeleer
mikewheeleer merged commit df42cbf into Agentpay-Org:main Jul 28, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add first and last page controls plus a result count to Pagination

2 participants