Merge pull request #55666 from nextcloud/fix/53038/clear-search

This commit is contained in:
Maksim Sukharev 2025-10-14 09:22:50 +02:00 committed by GitHub
commit 9c8b500116
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 6 additions and 5 deletions

View file

@ -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) {

4
dist/files-main.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long