From 3055214757feb91759b05a82d6b23f3065163225 Mon Sep 17 00:00:00 2001 From: Josemi Date: Mon, 13 Jan 2025 18:16:42 +0100 Subject: [PATCH] wc: Perform query when user changes a quick filter #TASK-7216 #TASK-7100 --- .../variant/variant-browser-horizontal-filter.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/webcomponents/variant/variant-browser-horizontal-filter.js b/src/webcomponents/variant/variant-browser-horizontal-filter.js index 299f83ac8..692426297 100644 --- a/src/webcomponents/variant/variant-browser-horizontal-filter.js +++ b/src/webcomponents/variant/variant-browser-horizontal-filter.js @@ -293,7 +293,16 @@ export default class VariantBrowserHorizontalFilter extends LitElement { this.preparedQuery = {...this.preparedQuery}; // this.updateQueryList(); this.notifyQuery(this.preparedQuery); - this.requestUpdate(); + // this.requestUpdate(); + // check if this is a quick filter --> if so, we have to dispatch the search event + if (this.quickFiltersList.length > 0) { + const filterId = Object.keys(this.mapFilterIdToField) + .find(id => this.mapFilterIdToField[id] === key); + // verify of the filter id is in the quickFiltersList + if (filterId && this.quickFiltersList.find(filter => filter.id === filterId)) { + this.notifySearch(this.preparedQuery); + } + } } // DEPRECATED