diff options
author | blizzz <blizzz@arthur-schiwon.de> | 2022-10-19 11:14:26 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-19 11:14:26 +0200 |
commit | 05e320a0347a6e621a16b845f3c83a2099935f51 (patch) | |
tree | f8067c226308e97df1574e47290e7784c3f905f8 /core/src | |
parent | 433f8011a8eaea4a0546b6f60b6f8c1d4d082c1a (diff) | |
parent | 08adbbd7ef3f11b7582c4296b6ac4a39ac63b7d0 (diff) | |
download | nextcloud-server-05e320a0347a6e621a16b845f3c83a2099935f51.tar.gz nextcloud-server-05e320a0347a6e621a16b845f3c83a2099935f51.zip |
Merge pull request #34661 from nextcloud/backport/34614/stable25
[stable25] Fix regexp for unified searching in apps
Diffstat (limited to 'core/src')
-rw-r--r-- | core/src/views/UnifiedSearch.vue | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/core/src/views/UnifiedSearch.vue b/core/src/views/UnifiedSearch.vue index 60ef3ef0309..d13ba9114bc 100644 --- a/core/src/views/UnifiedSearch.vue +++ b/core/src/views/UnifiedSearch.vue @@ -78,7 +78,7 @@ :key="type" icon="icon-filter" :title="t('core', 'Search for {name} only', { name: typesMap[type] })" - @click="onClickFilter(`in:${type}`)"> + @click.stop="onClickFilter(`in:${type}`)"> {{ `in:${type}` }} </NcActionButton> </NcActions> @@ -141,7 +141,7 @@ ? t('core', 'Loading more results …') : t('core', 'Load more results')" :icon-class="loading[type] ? 'icon-loading-small' : ''" - @click.prevent="loadMore(type)" + @click.stop="loadMore(type)" @focus="setFocusedIndex" /> </li> </ul> @@ -272,7 +272,7 @@ export default { let match const filters = [] while ((match = regexFilterIn.exec(this.query)) !== null) { - filters.push(match[1]) + filters.push(match[2]) } return filters }, @@ -286,7 +286,7 @@ export default { let match const filters = [] while ((match = regexFilterNot.exec(this.query)) !== null) { - filters.push(match[1]) + filters.push(match[2]) } return filters }, @@ -469,6 +469,13 @@ export default { // Reset search if the query changed await this.resetState() this.triggered = true + + if (!types.length) { + // no results since no types were selected + this.logger.error('No types to search in') + return + } + this.$set(this.loading, 'all', true) this.logger.debug(`Searching ${query} in`, types) |