From 69dd690c1adf9195782f4747ba5d255251f5ac3c Mon Sep 17 00:00:00 2001 From: lauramargar <114984466+lauramargar@users.noreply.github.com> Date: Mon, 30 Sep 2024 10:51:01 +0200 Subject: [PATCH] fix(tagging): query tagging and send session param (#1627) --- .../tagging/components/__tests__/tagging.spec.ts | 3 ++- .../src/x-modules/tagging/components/tagging.vue | 12 +++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/packages/x-components/src/x-modules/tagging/components/__tests__/tagging.spec.ts b/packages/x-components/src/x-modules/tagging/components/__tests__/tagging.spec.ts index c998f4ac70..6357d01859 100644 --- a/packages/x-components/src/x-modules/tagging/components/__tests__/tagging.spec.ts +++ b/packages/x-components/src/x-modules/tagging/components/__tests__/tagging.spec.ts @@ -88,7 +88,8 @@ function renderTagging({ const defaultTaggingConfig: Partial = { clickedResultStorageTTLMs: 30000, - clickedResultStorageKey: 'url' + clickedResultStorageKey: 'url', + queryTaggingDebounceMs: 2000 }; const stubTagginMetadata: WireMetadata = { diff --git a/packages/x-components/src/x-modules/tagging/components/tagging.vue b/packages/x-components/src/x-modules/tagging/components/tagging.vue index 1600fe65fd..91872ab89c 100644 --- a/packages/x-components/src/x-modules/tagging/components/tagging.vue +++ b/packages/x-components/src/x-modules/tagging/components/tagging.vue @@ -37,11 +37,17 @@ /** * The debounce time in milliseconds to track the query. */ - queryTaggingDebounceMs: Number, + queryTaggingDebounceMs: { + type: Number, + default: 2000 + }, /** * The consent to be emitted. */ - consent: Boolean + consent: { + type: Boolean, + default: null + } }, setup(props) { const xBus = useXBus(); @@ -67,7 +73,7 @@ */ const taggingConfig = computed(() => { return { - queryTaggingDebounceMs: props.queryTaggingDebounceMs as number, + queryTaggingDebounceMs: props.queryTaggingDebounceMs, sessionTTLMs: props.sessionTTLMs as number, clickedResultStorageTTLMs: props.clickedResultStorageTTLMs, clickedResultStorageKey: props.clickedResultStorageKey