values of selected filters are arranged #1869
This commit is contained in:
parent
739c2ebebf
commit
18c4b345e5
@ -598,6 +598,7 @@ export default {
|
|||||||
let option = '';
|
let option = '';
|
||||||
let operator = '=';
|
let operator = '=';
|
||||||
let value = '';
|
let value = '';
|
||||||
|
let value_assigned = false;
|
||||||
|
|
||||||
this.filter_list.forEach(function (_filter, i) {
|
this.filter_list.forEach(function (_filter, i) {
|
||||||
let filter_values = this.convertOption(_filter.values);
|
let filter_values = this.convertOption(_filter.values);
|
||||||
@ -630,20 +631,20 @@ export default {
|
|||||||
|
|
||||||
this.option_values[_filter.key] = filter_values;
|
this.option_values[_filter.key] = filter_values;
|
||||||
|
|
||||||
if (filter_values.length > 0) {
|
|
||||||
filter_values.forEach(function (value, j) {
|
filter_values.forEach(function (value, j) {
|
||||||
if (value.key == filter[1]) {
|
if (value.key == filter[1]) {
|
||||||
this.selected_values.push(value);
|
this.selected_values.push(value);
|
||||||
|
|
||||||
this.option_values[_filter.key].splice(j, 1);
|
this.option_values[_filter.key].splice(j, 1);
|
||||||
|
|
||||||
|
value_assigned = true
|
||||||
}
|
}
|
||||||
}, this);
|
}, this);
|
||||||
} else {
|
|
||||||
if (cookie != undefined && cookie[_filter.key]) {
|
if (!value_assigned && (cookie != undefined && cookie[_filter.key])) {
|
||||||
this.selected_values.push(cookie[_filter.key]);
|
this.selected_values.push(cookie[_filter.key]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}, this);
|
}, this);
|
||||||
|
|
||||||
this.filtered.push({
|
this.filtered.push({
|
||||||
|
Loading…
x
Reference in New Issue
Block a user