Skip to content

fix: Search bar fix to clear search when navigating away - #107

Merged
Austin616 merged 1 commit into
Longhorn-Developers:mainfrom
jessmed749:fix/clear-search-on-home
Apr 3, 2026
Merged

fix: Search bar fix to clear search when navigating away#107
Austin616 merged 1 commit into
Longhorn-Developers:mainfrom
jessmed749:fix/clear-search-on-home

Conversation

@jessmed749

Copy link
Copy Markdown
Contributor

Summary

  • When a user navigates away from /browse (e.g. to Home, a listing page, profile, etc.), the navbar search bar is now automatically cleared
  • Search term persists while the user stays on /browse to refine results
  • Suggestions dropdown is also cleared on navigation

What changed

components/globals/Navbar.tsx -> Added setSearchValue("") and setSuggestions([]) to the existing pathname effect, conditioned on the user leaving /browse.

@Austin616
Austin616 self-requested a review April 3, 2026 20:35
@Austin616
Austin616 merged commit 259d91c into Longhorn-Developers:main Apr 3, 2026
1 check 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