diff options
author | John Molakvoæ <skjnldsv@users.noreply.github.com> | 2020-09-02 09:27:58 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-02 09:27:58 +0200 |
commit | 34aca4632574d153c716589a08497c0957b3679f (patch) | |
tree | 9969c6266ccd3fd0b668da62d07fb40448ae1757 /core/src | |
parent | d1ea6e09bce7a949e0e8fad17c128a289978a851 (diff) | |
parent | 7abfaadc54d8c5f69f0c39352870c9215bd31d85 (diff) | |
download | nextcloud-server-34aca4632574d153c716589a08497c0957b3679f.tar.gz nextcloud-server-34aca4632574d153c716589a08497c0957b3679f.zip |
Merge pull request #22526 from nextcloud/feature/unified-search/emit-query
Emit unified search query
Diffstat (limited to 'core/src')
-rw-r--r-- | core/src/views/UnifiedSearch.vue | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/core/src/views/UnifiedSearch.vue b/core/src/views/UnifiedSearch.vue index 56cb12d3dc7..4569d1c46b6 100644 --- a/core/src/views/UnifiedSearch.vue +++ b/core/src/views/UnifiedSearch.vue @@ -101,6 +101,7 @@ import { minSearchLength, getTypes, search, defaultLimit } from '../services/Uni import EmptyContent from '@nextcloud/vue/dist/Components/EmptyContent' import Magnify from 'vue-material-design-icons/Magnify' import debounce from 'debounce' +import { emit } from '@nextcloud/event-bus' import HeaderMenu from '../components/HeaderMenu' import SearchResult from '../components/UnifiedSearch/SearchResult' @@ -243,6 +244,7 @@ export default { onClose() { this.resetState() this.query = '' + emit('nextcloud:unified-search:close') }, resetState() { @@ -281,6 +283,9 @@ export default { * Start searching on input */ async onInput() { + // emit the search query + emit('nextcloud:unified-search:search', { query: this.query }) + // Do not search if not long enough if (this.query.trim() === '' || this.isShortQuery) { return |