#1906 serach form autocmplete multi terms
This commit is contained in:
@ -73,10 +73,12 @@ export default {
|
||||
this.pagetitle = 'Base'
|
||||
}
|
||||
|
||||
if (params.has('term')) {
|
||||
this.$store.commit('Search/setTerm', params.get('term'))
|
||||
if (params.has('terms')) {
|
||||
console.log('Base created, has terms', params.get('terms'))
|
||||
// this.$store.commit('Search/setTerms', params.get('terms').split(','))
|
||||
this.$store.commit('Search/setTerms', JSON.parse(params.get('terms')))
|
||||
} else {
|
||||
this.$store.commit('Search/setTerm', '')
|
||||
this.$store.commit('Search/setTerms', [])
|
||||
}
|
||||
|
||||
if (params.has('filters')) {
|
||||
@ -91,7 +93,7 @@ export default {
|
||||
// when query change launch a new search
|
||||
console.log('Base beforeRouteUpdate', to, from, next)
|
||||
this.$store.commit('Search/setKeys', to.query.keys)
|
||||
this.$store.commit('Search/setTerm', to.query.term)
|
||||
this.$store.commit('Search/setTerms', to.query.terms)
|
||||
this.$store.commit('Search/setFilters', to.query.filters)
|
||||
this.pagetitle = to.query.keys
|
||||
this.newSearch()
|
||||
|
Reference in New Issue
Block a user