Add search engine to settings

This commit is contained in:
Angelina Filippova 2020-02-25 16:35:56 +03:00
parent d0c885c295
commit b6d678b423

View file

@ -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)
}
}