diff --git a/changelog/unreleased/bugfix-in-here-search b/changelog/unreleased/bugfix-in-here-search new file mode 100644 index 00000000000..cef8f400ef6 --- /dev/null +++ b/changelog/unreleased/bugfix-in-here-search @@ -0,0 +1,6 @@ +Bugfix: Allow empty search query in "in-here" search + +Allowing empty search queries in the "in-here" search instead of fallback to search "everywhere". + +https://github.com/owncloud/web/pull/10092 +https://github.com/owncloud/web/issues/9970 diff --git a/packages/web-app-files/src/components/Search/List.vue b/packages/web-app-files/src/components/Search/List.vue index 55e2868f652..ae766f84675 100644 --- a/packages/web-app-files/src/components/Search/List.vue +++ b/packages/web-app-files/src/components/Search/List.vue @@ -397,7 +397,6 @@ export default defineComponent({ query['mediatype'] = mediaTypeParams.split('+').map((t) => `"${t}"`) updateFilter(mediaTypeFilter) } - return ( // By definition (KQL spec) OR, AND or (GROUP) is implicit for simple cases where // different or identical keys are part of the query. @@ -420,6 +419,7 @@ export default defineComponent({ return acc }, []) + .sort((a, b) => a.startsWith('scope:') - b.startsWith('scope:')) .join(' AND ') ) } diff --git a/packages/web-app-search/src/portals/SearchBar.vue b/packages/web-app-search/src/portals/SearchBar.vue index f7659182471..0566f6d1742 100644 --- a/packages/web-app-search/src/portals/SearchBar.vue +++ b/packages/web-app-search/src/portals/SearchBar.vue @@ -220,7 +220,6 @@ export default defineComponent({ scope = unref(scopeQueryValue) } const useScope = - unref(term) && unref(currentFolderAvailable) && unref(locationFilterId) === SearchLocationFilterConstants.inHere router.push(