diff --git a/src/components/Menu.vue b/src/components/Menu.vue index e21af8bd3..7ffa518e4 100644 --- a/src/components/Menu.vue +++ b/src/components/Menu.vue @@ -84,7 +84,9 @@ }, 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 89775172a..860c7a0e0 100644 --- a/src/components/Rating.vue +++ b/src/components/Rating.vue @@ -55,7 +55,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 08a0735f1..fed70c134 100644 --- a/src/components/RefinementList.vue +++ b/src/components/RefinementList.vue @@ -62,7 +62,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 4ec793d37..aafae59e9 100644 --- a/src/components/TreeMenu.vue +++ b/src/components/TreeMenu.vue @@ -42,7 +42,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', () => {