Merge pull request #2844 from brkcvn/master
Search component refactored
This commit is contained in:
commit
53292a463e
@ -349,6 +349,7 @@ export default {
|
||||
onInputConfirm() {
|
||||
let path = window.location.href.replace(window.location.search, '');
|
||||
let args = '';
|
||||
let redirect = true;
|
||||
|
||||
if (this.search) {
|
||||
args += '?search="' + this.search + '" ';
|
||||
@ -366,6 +367,11 @@ export default {
|
||||
args += '?search=';
|
||||
}
|
||||
|
||||
if (! this.selected_operator.length || ! this.selected_values.length) {
|
||||
redirect = false;
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.selected_operator[index].key == '!=') {
|
||||
args += 'not ';
|
||||
}
|
||||
@ -388,7 +394,9 @@ export default {
|
||||
|
||||
Cookies.set('search-string', search_string, expires);
|
||||
|
||||
window.location = path + args;
|
||||
if (redirect) {
|
||||
window.location = path + args;
|
||||
}
|
||||
},
|
||||
|
||||
onOptionSelected(value) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user