From 4b3eee4d99ee0bbaaf2d0c11e63f705c503e57d8 Mon Sep 17 00:00:00 2001 From: Renato Cason Date: Fri, 1 Feb 2019 15:38:08 +0100 Subject: [PATCH] Ref. #2262 Fix merging for category filter clear --- core/compatibility/components/blocks/Category/Sidebar.js | 6 ++++-- core/modules/catalog/components/CategoryFilters.ts | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/core/compatibility/components/blocks/Category/Sidebar.js b/core/compatibility/components/blocks/Category/Sidebar.js index 410a10dfdd..af8c392cdf 100644 --- a/core/compatibility/components/blocks/Category/Sidebar.js +++ b/core/compatibility/components/blocks/Category/Sidebar.js @@ -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) } } diff --git a/core/modules/catalog/components/CategoryFilters.ts b/core/modules/catalog/components/CategoryFilters.ts index 1abc58cef8..75b9baf952 100644 --- a/core/modules/catalog/components/CategoryFilters.ts +++ b/core/modules/catalog/components/CategoryFilters.ts @@ -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) } }