From b67a9087ccf6f7593979695761c793b738d968f2 Mon Sep 17 00:00:00 2001 From: Mats Johansen Date: Thu, 21 Dec 2023 09:20:02 +0100 Subject: [PATCH] fix(searchbar): search for entities works --- .../src/components/search-bar/SearchBarComponent.wc.svelte | 4 ++-- packages/lib/src/types/queryData.ts | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/lib/src/components/search-bar/SearchBarComponent.wc.svelte b/packages/lib/src/components/search-bar/SearchBarComponent.wc.svelte index 3b360fc2..4d765b05 100644 --- a/packages/lib/src/components/search-bar/SearchBarComponent.wc.svelte +++ b/packages/lib/src/components/search-bar/SearchBarComponent.wc.svelte @@ -175,11 +175,11 @@ id: uuidv4(), name: inputItem.name, key: inputItem.key, - type: inputItem.type, + type: "type" in inputItem && inputItem.type, system: "system" in inputItem && inputItem.system, values: [ { - value: inputItem.criterion.key, + value: 'aggregatedValue' in inputItem.criterion ? inputItem.criterion.aggregatedValue : inputItem.criterion.key, name: inputItem.criterion.name, description: inputItem.criterion.description, queryBindId: uuidv4(), diff --git a/packages/lib/src/types/queryData.ts b/packages/lib/src/types/queryData.ts index daec542f..02875bab 100644 --- a/packages/lib/src/types/queryData.ts +++ b/packages/lib/src/types/queryData.ts @@ -28,6 +28,7 @@ export type AutoCompleteItem = { key: string; name: string; description?: string; + aggregatedValue?: AggregatedValue[][]; }; };