Skip to content

fix: correct reversed comparison in admin organisations table pagination - #2842

Merged
dguyen merged 1 commit into
documenso:mainfrom
Abzaek:fix/admin-organisations-pagination
May 22, 2026
Merged

dguyen merged 1 commit into
documenso:mainfrom
Abzaek:fix/admin-organisations-pagination

Conversation

@Abzaek

@Abzaek Abzaek commented May 20, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes bug #5 from the Faultmark scan (issue #2829): the admin organisations table pagination was permanently hidden because the comparison was reversed.

Root cause

Line 241 had 1 > table.getPageCount() — the literal 1 and getPageCount() were swapped. 1 > getPageCount() is only true when there are zero pages, which never happens in practice. The pagination bar was never shown.

Fix

Changed to table.getPageCount() > 1 — pagination now correctly shows when there are multiple pages.

Partially addresses #2829

Bug #5 from Faultmark scan (issue documenso#2829): the visibility check was
1 > table.getPageCount() which is only true when there are zero pages.
Changed to table.getPageCount() > 1 so pagination shows when there are
multiple pages.

Signed-off-by: Abdulazez A. <[email protected]>
@vercel

vercel Bot commented May 20, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

3 Skipped Deployments
Project Deployment Actions Updated (UTC)
prd-docs Ignored Ignored May 20, 2026 11:02pm
prd-openpage-api Ignored Ignored May 20, 2026 11:02pm
stg-docs Skipped Skipped May 20, 2026 11:02pm

Request Review

@coderabbitai

coderabbitai Bot commented May 20, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are limited based on label configuration.

🏷️ Required labels (at least one) (1)
  • coderabbit

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 9dada6c6-bc09-47fa-bfd8-1d90a6ec61de

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@vercel
vercel Bot temporarily deployed to Preview – stg-docs May 20, 2026 23:02 Inactive
@Mythie

Mythie commented May 20, 2026

Copy link
Copy Markdown
Collaborator

Hey there, it looks like you haven't accepted our contributor license agreement yet. In order for us to accept your pull request we ask that you please fill out the CLA:

https://documen.so/cla

@dguyen dguyen left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks!

@dguyen
dguyen merged commit d0f9f68 into documenso:main May 22, 2026
2 checks passed
scoobs-mystery-bytes pushed a commit to scoobs-mystery-bytes/documenso that referenced this pull request May 30, 2026

This branch was previously deployed

1 inactive deployment
Preview – stg-docs — 385558fa Deployed May 20, 2026 by vercel[bot]
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.

3 participants