Skip to content

fix(account): fix "load more" button state for filtered results (@d1rshan)#8020

Open
d1rshan wants to merge 4 commits into
monkeytypegame:masterfrom
d1rshan:fix/load-more
Open

fix(account): fix "load more" button state for filtered results (@d1rshan)#8020
d1rshan wants to merge 4 commits into
monkeytypegame:masterfrom
d1rshan:fix/load-more

Conversation

@d1rshan
Copy link
Copy Markdown
Contributor

@d1rshan d1rshan commented May 28, 2026

"load more" button used getResultsSize() (unfiltered total) to decide if more results exist. With active filters this always showed the button as enabled.

Fix

  • fetch limit + 1 filtered results
  • render only the first limit
  • use the extra row to determine whether more results exist

Copilot AI review requested due to automatic review settings May 28, 2026 05:25
@monkeytypegeorge monkeytypegeorge added the frontend User interface or web stuff label May 28, 2026
@github-actions github-actions Bot added the waiting for review Pull requests that require a review before continuing label May 28, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Replaces the use of getResultsSize() with a direct length check on the loaded results data to determine whether the "load more" button should be disabled on the account page.

Changes:

  • Removed the getResultsSize import from ../../../collections/results.
  • Updated the "load more" button disabled condition to compare resultsQueryData().length against limit().

Comment thread frontend/src/ts/components/pages/account/AccountPage.tsx Outdated
@d1rshan d1rshan marked this pull request as draft May 28, 2026 05:30
@github-actions github-actions Bot removed the waiting for review Pull requests that require a review before continuing label May 28, 2026
@d1rshan d1rshan changed the title fix(account): use filtered result count for "load more" button disabled state (@d1rshan) fix(account): fix "load more" button state for filtered results (@d1rshan) May 28, 2026
@d1rshan d1rshan requested a review from Copilot May 28, 2026 06:11
@github-actions github-actions Bot added the waiting for review Pull requests that require a review before continuing label May 28, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Comment thread frontend/src/ts/components/pages/account/AccountPage.tsx Outdated
@d1rshan d1rshan marked this pull request as ready for review May 28, 2026 06:14
Comment thread frontend/src/ts/components/pages/account/AccountPage.tsx
@github-actions github-actions Bot removed the waiting for review Pull requests that require a review before continuing label May 28, 2026
Comment thread frontend/src/ts/components/pages/account/AccountPage.tsx Outdated
@fehmer
Copy link
Copy Markdown
Member

fehmer commented May 28, 2026

hi @d1rshan , nice solution. Few comments on the pr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frontend User interface or web stuff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants