From ce9010942227fe60356c6e488faa614e62b27914 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Mon, 2 Oct 2023 13:37:06 +0200 Subject: [PATCH 1/2] Fixing filtering on user column --- .../src/components/grid/cells/BBReferenceCell.svelte | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/frontend-core/src/components/grid/cells/BBReferenceCell.svelte b/packages/frontend-core/src/components/grid/cells/BBReferenceCell.svelte index be99c9f633..79eedec205 100644 --- a/packages/frontend-core/src/components/grid/cells/BBReferenceCell.svelte +++ b/packages/frontend-core/src/components/grid/cells/BBReferenceCell.svelte @@ -3,6 +3,8 @@ import RelationshipCell from "./RelationshipCell.svelte" import { FieldSubtype } from "@budibase/types" + export let api + const { API } = getContext("grid") const { subtype } = $$props.schema @@ -17,8 +19,10 @@ throw `Search for '${subtype}' not implemented` } + const email = Object.values(searchParams.query.string)[0] + const results = await API.searchUsers({ - ...searchParams, + email, }) // Mapping to the expected data within RelationshipCell @@ -31,6 +35,7 @@ Date: Mon, 2 Oct 2023 13:41:07 +0200 Subject: [PATCH 2/2] Add comment --- .../src/components/grid/cells/BBReferenceCell.svelte | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/frontend-core/src/components/grid/cells/BBReferenceCell.svelte b/packages/frontend-core/src/components/grid/cells/BBReferenceCell.svelte index 79eedec205..b4168474b0 100644 --- a/packages/frontend-core/src/components/grid/cells/BBReferenceCell.svelte +++ b/packages/frontend-core/src/components/grid/cells/BBReferenceCell.svelte @@ -19,6 +19,7 @@ throw `Search for '${subtype}' not implemented` } + // As we are overriding the search function from RelationshipCell, we want to map one shape to the expected one for the specific API const email = Object.values(searchParams.query.string)[0] const results = await API.searchUsers({