Fix modules and subworkflows search pagination #3270
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Re-opening this as the issue seems to have persisted through the svelte 5 upgrade
Closes #2883
Old PR: #3089
Old PR Desc:
Fix modules search pagination issue
Overview
Fixes an issue where browsing modules on https://nf-co.re/modules/ sometimes shows blank search results.
This fix simply sets the
currentPage = 1
for the paginator each time theSearchQuery
is updated.Closes #2883
Presumably the subworkflows page has the same issue that will be fixed by this, but it has another bug on top of that (#2942) preventing testing which I'll have a look at in another PR
Steps to reproduce
abs
(which only has 1 result)previous
button until back on page 1 where you can see the results