From b6d678b423f1fffee997c6163127066a42285a71 Mon Sep 17 00:00:00 2001 From: Angelina Filippova Date: Tue, 25 Feb 2020 16:35:56 +0300 Subject: [PATCH] Add search engine to settings --- src/views/settings/index.vue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/views/settings/index.vue b/src/views/settings/index.vue index 1e73be0f..2f88a682 100644 --- a/src/views/settings/index.vue +++ b/src/views/settings/index.vue @@ -280,8 +280,9 @@ export default { }) }, querySearch(queryString, cb) { - const results = this.searchData - // call callback function to return suggestions + const results = Object.keys(this.searchData) + .filter(key => this.searchData[key].find(a => a.includes(queryString))) + .map(el => { return { value: el } }) cb(results) } }