Skip to content

Commit

Permalink
Ref. vuestorefront#2262 Fix merging for category filter clear
Browse files Browse the repository at this point in the history
  • Loading branch information
renatocason committed Feb 1, 2019
1 parent 9bd9692 commit 4b3eee4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions core/compatibility/components/blocks/Category/Sidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,10 @@ export default {
resetAllFilters () {
this.$bus.$emit('filter-reset')
this.$store.dispatch('category/resetFilters')
this.$store.dispatch('category/searchProductQuery', buildFilterProductsQuery(this.category, this.activeFilters))
this.$store.dispatch('category/mergeSearchOptions', {searchProductQuery: {}})
this.$store.dispatch('category/searchProductQuery', {})
this.$store.dispatch('category/mergeSearchOptions', {
searchProductQuery: buildFilterProductsQuery(this.category, this.activeFilters)
})
this.$store.dispatch('category/products', this.getCurrentCategoryProductQuery)
}
}
Expand Down
6 changes: 4 additions & 2 deletions core/modules/catalog/components/CategoryFilters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@ export default {
// todo: get rid of this one
this.$bus.$emit('filter-reset')
this.$store.dispatch('category/resetFilters')
this.$store.dispatch('category/searchProductQuery', buildFilterProductsQuery(this.category, this.activeFilters))
this.$store.dispatch('category/mergeSearchOptions', {searchProductQuery: {}})
this.$store.dispatch('category/searchProductQuery', {})
this.$store.dispatch('category/mergeSearchOptions', {
searchProductQuery: buildFilterProductsQuery(this.category, this.activeFilters)
})
this.$store.dispatch('category/products', this.getCurrentCategoryProductQuery)
}
}
Expand Down

0 comments on commit 4b3eee4

Please sign in to comment.