summaryrefslogtreecommitdiffstats
path: root/core/src
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@users.noreply.github.com>2020-09-02 09:27:58 +0200
committerGitHub <noreply@github.com>2020-09-02 09:27:58 +0200
commit34aca4632574d153c716589a08497c0957b3679f (patch)
tree9969c6266ccd3fd0b668da62d07fb40448ae1757 /core/src
parentd1ea6e09bce7a949e0e8fad17c128a289978a851 (diff)
parent7abfaadc54d8c5f69f0c39352870c9215bd31d85 (diff)
downloadnextcloud-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.vue5
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