Skip to content
This repository was archived by the owner on Jan 26, 2024. It is now read-only.

Commit 2600906

Browse files
authored
Merge branch 'develop' into feature/#2458-filters-adjustment
2 parents 8f6e6f7 + 4d15050 commit 2600906

File tree

1 file changed

+9
-7
lines changed
  • core/compatibility/components/blocks/Category

1 file changed

+9
-7
lines changed

core/compatibility/components/blocks/Category/Sidebar.js

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,15 @@ export default {
3333
return [...filters].sort((a, b) => { return a.id - b.id })
3434
},
3535
resetAllFilters () {
36-
this.$bus.$emit('filter-reset')
37-
this.$store.dispatch('category/resetFilters')
38-
this.$store.dispatch('category/searchProductQuery', {})
39-
this.$store.dispatch('category/mergeSearchOptions', {
40-
searchProductQuery: buildFilterProductsQuery(this.category, this.activeFilters)
41-
})
42-
this.$store.dispatch('category/products', this.getCurrentCategoryProductQuery)
36+
if (this.hasActiveFilters) {
37+
this.$bus.$emit('filter-reset')
38+
this.$store.dispatch('category/resetFilters')
39+
this.$store.dispatch('category/searchProductQuery', {})
40+
this.$store.dispatch('category/mergeSearchOptions', {
41+
searchProductQuery: buildFilterProductsQuery(this.category, this.activeFilters)
42+
})
43+
this.$store.dispatch('category/products', this.getCurrentCategoryProductQuery)
44+
}
4345
}
4446
}
4547
}

0 commit comments

Comments
 (0)