Fix: Reset search filter when navigating between directories #191

Closed
opened 2026-04-05 19:51:49 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @Jaie55 on 4/14/2025

Problem
When navigating to a folder from search results, the search input visually clears but the filter remains active, hiding files that don't match the previous search.

Solution
Added useRef for the search input and implemented a useEffect that properly resets both the search state and input value when directory, hash, or pathname changes.

There are many changes because I use the Prettier extension in VSCode. (sorry for that)

Issue: https://github.com/pyrohost/pyrodactyl/issues/186

*Originally created by @Jaie55 on 4/14/2025* Problem When navigating to a folder from search results, the search input visually clears but the filter remains active, hiding files that don't match the previous search. Solution Added useRef for the search input and implemented a useEffect that properly resets both the search state and input value when directory, hash, or pathname changes. There are many changes because I use the Prettier extension in VSCode. (sorry for that) Issue: https://github.com/pyrohost/pyrodactyl/issues/186
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/pyrodactyl#191