Skip to content

Conversation

@anxkhn
Copy link
Contributor

@anxkhn anxkhn commented Aug 13, 2025

Description:
This PR enhances the table pagination experience by allowing users to choose how many rows to display per page, instead of the previous fixed 10 rows. While the default remains 10 rows for consistency, users can now select 20, 50, 100, or “All” to view more results at once.

The update also improves navigation by:

  • Displaying a “Showing X–Y of Z” indicator to clearly communicate the current range of results.
  • Disabling the Prev and Next buttons when at the boundaries to prevent invalid navigation.
  • Ensuring the pagination state is recalculated automatically when filtering results or changing the page size.

Changes:

  • Removed the old page number dropdown (pageSelect) in favor of a Rows per page selector (pageSizeSelect).
  • Added computeTotalPages() to handle dynamic page size changes and ensure valid navigation boundaries.
  • Added renderShowingText() to show the visible range and total offers.
  • Added updatePrevNextDisabledState() to handle disabling navigation buttons when appropriate.
  • Updated HTML to reflect the new UI elements and labels.
  • Maintained the default value to be 10 rows.

Pre-commit Checks:

  • Ran pre-commit run --all-files locally with no issues found.

UI Design and Aesthetics:

  • Matches the existing bootstrap-based styling and typography.
  • Added small muted labels for “Rows per page” and “Showing…” text for better clarity without clutter.

Screenshots:
Screenshot 2025-08-14 at 1 11 29 AM

@kuutsav kuutsav merged commit 4c1f405 into kuutsav:master Aug 15, 2025
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.

2 participants