Skip to content

Commit

Permalink
Allowing in-here search with empty query (#10092)
Browse files Browse the repository at this point in the history
  • Loading branch information
jacob-nv authored Nov 30, 2023
1 parent 9903a4f commit 197a236
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
6 changes: 6 additions & 0 deletions changelog/unreleased/bugfix-in-here-search
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion packages/web-app-files/src/components/Search/List.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -420,6 +419,7 @@ export default defineComponent({
return acc
}, [])
.sort((a, b) => a.startsWith('scope:') - b.startsWith('scope:'))
.join(' AND ')
)
}
Expand Down
1 change: 0 additions & 1 deletion packages/web-app-search/src/portals/SearchBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,6 @@ export default defineComponent({
scope = unref(scopeQueryValue)
}
const useScope =
unref(term) &&
unref(currentFolderAvailable) &&
unref(locationFilterId) === SearchLocationFilterConstants.inHere
router.push(
Expand Down

0 comments on commit 197a236

Please sign in to comment.