Skip to content

fix: make pagination reactive to lastPage changes#4312

Merged
dialvarezs merged 1 commit into
nf-core:mainfrom
dialvarezs:fix/pagination-stale-lastpage
Jul 17, 2026
Merged

fix: make pagination reactive to lastPage changes#4312
dialvarezs merged 1 commit into
nf-core:mainfrom
dialvarezs:fix/pagination-stale-lastpage

Conversation

@dialvarezs

Copy link
Copy Markdown
Member

When searching modules and subworkflows, pagination is only computed on mount and when clicking its buttons.
This causes odd behaviour with the search field: the paginator keeps showing the pre-search page count (up to maxPages), and clicking a page higher than the filtered lastPage renders a blank listing.

This PR fixes it by making the page buttons reactive to lastPage, and clamps currentPage when lastPage shrinks.

@netlify

netlify Bot commented Jul 17, 2026

Copy link
Copy Markdown

Deploy Preview for nf-core-main-site ready!

Name Link
🔨 Latest commit 391d285
🔍 Latest deploy log https://app.netlify.com/projects/nf-core-main-site/deploys/6a59e269eacb350008f0c40a
😎 Deploy Preview https://deploy-preview-4312--nf-core-main-site.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented Jul 17, 2026

Copy link
Copy Markdown

Deploy Preview for nf-core-docs ready!

Name Link
🔨 Latest commit 391d285
🔍 Latest deploy log https://app.netlify.com/projects/nf-core-docs/deploys/6a59e26bb03ad70008d5145c
😎 Deploy Preview https://deploy-preview-4312--nf-core-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@mashehu mashehu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

thanks for this fix!

@dialvarezs
dialvarezs merged commit 4924a0f into nf-core:main Jul 17, 2026
12 checks passed
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