values of selected filters are arranged #1869

This commit is contained in:
Sevan Nerse 2021-02-26 12:25:52 +03:00
parent 19093668ec
commit 739c2ebebf

View File

@ -630,6 +630,7 @@ 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);
@ -637,11 +638,12 @@ export default {
this.option_values[_filter.key].splice(j, 1); this.option_values[_filter.key].splice(j, 1);
} }
}, this); }, this);
} else {
if (cookie != undefined && cookie[_filter.key]) { if (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({