From cc6518efe8e00bf02240ca54e39ef77d05a3139f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=20Antonio=20Caba=C3=B1eros?= Date: Fri, 7 Jun 2024 10:28:50 +0200 Subject: [PATCH] fix(semantic-queries): cancel track no results query on QueryPreviewUnmounted event (#1507) --- packages/x-components/src/x-modules/tagging/wiring.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/x-components/src/x-modules/tagging/wiring.ts b/packages/x-components/src/x-modules/tagging/wiring.ts index afe3886116..91674748f7 100644 --- a/packages/x-components/src/x-modules/tagging/wiring.ts +++ b/packages/x-components/src/x-modules/tagging/wiring.ts @@ -227,7 +227,8 @@ export const trackNoResultsQueryWithSemanticsWire = filter( */ export const trackNoResultsQueryWithSemanticsWireDebounced = moduleDebounce( trackNoResultsQueryWithSemanticsWire, - ({ state }) => state.config.queryTaggingDebounceMs + ({ state }) => state.config.queryTaggingDebounceMs, + { cancelOn: 'QueryPreviewUnmounted' } ); /**