mirror of
https://github.com/nextcloud/server.git
synced 2026-06-11 01:30:50 -04:00
fix(files): clear search input on directory navigation
Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
This commit is contained in:
parent
2cb2ffe608
commit
196aa9b41b
1 changed files with 3 additions and 2 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue