From 7abfaadc54d8c5f69f0c39352870c9215bd31d85 Mon Sep 17 00:00:00 2001 From: Raimund Schlüßler Date: Mon, 31 Aug 2020 21:38:07 +0200 Subject: Emit unified search query MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Raimund Schlüßler Signed-off-by: npmbuildbot[bot] --- core/src/views/UnifiedSearch.vue | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'core/src') 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 -- cgit v1.2.3