Skip to content

Fixed search behavior: Now returning to page 1 of pagination on search#701

Open
Dboy0ZDev wants to merge 2 commits intomainfrom
fix-pagination-search
Open

Fixed search behavior: Now returning to page 1 of pagination on search#701
Dboy0ZDev wants to merge 2 commits intomainfrom
fix-pagination-search

Conversation

@Dboy0ZDev
Copy link
Copy Markdown
Collaborator

Fixes Issue: l3montree-dev/devguard#1865

The added change intends to return the user to page 1 of the paginated results. I believe that should be the intended workflow instead of staying on the same page as before the search (likely staying on a page that has no results).

All components/pages that use the useDebouncedQuerySearch() hook share this behavior, so the change was implemented directly into the hook.

Copilot AI review requested due to automatic review settings April 14, 2026 08:29
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

This PR updates the shared useDebouncedQuerySearch() hook so that changing the search term resets paginated views back to the first page, aligning search UX across all pages that rely on this hook.

Changes:

  • Update useDebouncedQuerySearch() to set the page query param to 1 whenever search changes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Dboy0ZDev Dboy0ZDev changed the title Fixed search behavior returning to page 1 after search Fixed search behavior: Now returning to page 1 of pagination on search Apr 14, 2026
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