diff --git a/src/components/Menu.vue b/src/components/Menu.vue index 1fcd18b04..2f86d36e0 100644 --- a/src/components/Menu.vue +++ b/src/components/Menu.vue @@ -85,7 +85,9 @@ export default { }, destroyed() { + this.searchStore.stop(); this.searchStore.removeFacet(this.attribute); + this.searchStore.start(); }, }; diff --git a/src/components/RangeInput.vue b/src/components/RangeInput.vue index 9b37c9b9c..037f651fe 100644 --- a/src/components/RangeInput.vue +++ b/src/components/RangeInput.vue @@ -111,7 +111,9 @@ export default { }, destroyed() { + this.searchStore.stop(); this.searchStore.removeFacet(this.attributeName); + this.searchStore.start(); }, computed: { diff --git a/src/components/Rating.vue b/src/components/Rating.vue index c86b7e10a..bcde2a00b 100644 --- a/src/components/Rating.vue +++ b/src/components/Rating.vue @@ -56,7 +56,9 @@ export default { this.searchStore.addFacet(this.attributeName, FACET_OR); }, destroyed() { + this.searchStore.stop(); this.searchStore.removeFacet(this.attributeName); + this.searchStore.start(); }, computed: { show() { diff --git a/src/components/RefinementList.vue b/src/components/RefinementList.vue index 48d217181..5386e6e02 100644 --- a/src/components/RefinementList.vue +++ b/src/components/RefinementList.vue @@ -63,7 +63,9 @@ export default { this.searchStore.addFacet(this.attributeName, this.operator); }, destroyed() { + this.searchStore.stop(); this.searchStore.removeFacet(this.attributeName); + this.searchStore.start(); }, computed: { facetValues() { diff --git a/src/components/TreeMenu.vue b/src/components/TreeMenu.vue index 67f5b85ff..637f16e71 100644 --- a/src/components/TreeMenu.vue +++ b/src/components/TreeMenu.vue @@ -43,7 +43,9 @@ export default { ); }, destroyed() { + this.searchStore.stop(); this.searchStore.removeFacet(this.attribute); + this.searchStore.start(); }, computed: { facetValues() { diff --git a/src/components/__tests__/menu-tree.js b/src/components/__tests__/menu-tree.js index 9d53bedd1..2a636b8d8 100644 --- a/src/components/__tests__/menu-tree.js +++ b/src/components/__tests__/menu-tree.js @@ -36,6 +36,8 @@ const addFacet = jest.fn(); const searchStore = { getFacetValues, addFacet, + stop: () => {}, + start: () => {}, }; test('renders proper HTML', () => { diff --git a/src/components/__tests__/refinement-list.js b/src/components/__tests__/refinement-list.js index 3b80325e3..3ecf97aa1 100644 --- a/src/components/__tests__/refinement-list.js +++ b/src/components/__tests__/refinement-list.js @@ -17,6 +17,8 @@ const addFacet = jest.fn(); const searchStore = { getFacetValues, addFacet, + stop: () => {}, + start: () => {}, }; test('renders proper HTML', () => {