Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions apps/files/src/components/FilesNavigationSearch.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ const searchStore = useSearchStore()
* we need to clear the search box.
*/
onBeforeNavigation((to, from, next) => {
if (to.params.view !== VIEW_ID && from.params.view === VIEW_ID) {
// we are leaving the search view so unset the query
if (to.params.view !== VIEW_ID
&& (from.params.view === VIEW_ID || from.query.dir !== to.query.dir)) {
// we are leaving the search view or navigate to another directory -> unset the query
searchStore.query = ''
searchStore.scope = 'filter'
} else if (to.params.view === VIEW_ID && from.params.view === VIEW_ID) {
Expand Down
Loading