To receive notifications about scheduled maintenance, please subscribe to the mailing-list gitlab-operations@sympa.ethz.ch. You can subscribe to the mailing-list at https://sympa.ethz.ch

Commit 17360226 authored by Hermann's avatar Hermann
Browse files

merge all selected filtergroups into 1 query

parent 4fb7ed22
......@@ -101,6 +101,15 @@ export default class TableView {
}
getSelectedFilteQuery() {
// produce a list of queries from the filters that are currently selected
const selectedFilters = [].concat(...this.filters.map(filterGroup =>
filterGroup.filter(filter => filter.selected === true).map(filter => filter.query)));
// now merge all queries into one new object
return Object.assign({}, ...selectedFilters);
}
view({
attrs: {
controller,
......@@ -167,12 +176,11 @@ export default class TableView {
});
// now set this filter to selected
this.filters[filterGroupIdx][filterIdx].selected = true;
console.log('filter set: ', thisFilter.query);
controller.setFilter(thisFilter.query);
} else {
this.filters[filterGroupIdx][filterIdx].selected = false;
controller.setFilter({});
}
// update filters in controller
controller.setFilter(this.getSelectedFilteQuery());
},
}, thisFilter.name);
})))),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment