Merge pull request #12385 from HabitRPG/fix/time-travelers-pinning

fix filter reset on pinning items
This commit is contained in:
Matteo Pagliazzi 2020-07-13 11:53:03 +02:00 committed by GitHub
commit 2a0bc030d8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 6 deletions

View file

@ -521,9 +521,12 @@ export default {
categories () {
if (this.shop.categories) {
this.shop.categories.forEach(category => {
this.$set(this.viewOptions, category.identifier, {
selected: false,
});
// do not reset the viewOptions if already set once
if (typeof this.viewOptions[category.identifier] === 'undefined') {
this.$set(this.viewOptions, category.identifier, {
selected: false,
});
}
});
return this.shop.categories;

View file

@ -379,9 +379,12 @@ export default {
normalGroups.push(setCategory);
normalGroups.forEach(category => {
this.$set(this.viewOptions, category.identifier, {
selected: false,
});
// do not reset the viewOptions if already set once
if (typeof this.viewOptions[category.identifier] === 'undefined') {
this.$set(this.viewOptions, category.identifier, {
selected: false,
});
}
});
return normalGroups;