[web] Remove blanks in the search query before launching a search
This commit is contained in:
parent
6a93172cb9
commit
5ce78d041d
|
@ -177,6 +177,7 @@ export default {
|
|||
this.search_types = SEARCH_TYPES
|
||||
this.search_limit = PAGE_SIZE
|
||||
}
|
||||
this.search_query = this.search_query.trim()
|
||||
if (!this.search_query || !this.search_query.replace(/^query:/u, '')) {
|
||||
this.$refs.search_field.focus()
|
||||
return
|
||||
|
|
|
@ -144,7 +144,6 @@ export default {
|
|||
this.search_types = [type]
|
||||
this.search_parameters.limit = PAGE_SIZE_EXPANDED
|
||||
this.search_parameters.offset = 0
|
||||
|
||||
this.search()
|
||||
},
|
||||
open_search(query) {
|
||||
|
@ -168,6 +167,7 @@ export default {
|
|||
this.search_types = SEARCH_TYPES
|
||||
this.search_parameters.limit = PAGE_SIZE
|
||||
}
|
||||
this.search_query = this.search_query.trim()
|
||||
if (!this.search_query) {
|
||||
this.$refs.search_field.focus()
|
||||
return
|
||||
|
|
Loading…
Reference in New Issue