From 20a39f53c6a3f4797ef20ce44a0dd5d4d7b00c24 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Mon, 22 Apr 2024 17:45:56 +0200 Subject: [PATCH] Hide counter for single references --- .../src/components/grid/cells/BBReferenceCell.svelte | 2 ++ .../src/components/grid/cells/BBReferenceSingleCell.svelte | 1 + .../src/components/grid/cells/RelationshipCell.svelte | 3 ++- 3 files changed, 5 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 48b1279346..056ad0aa39 100644 --- a/packages/frontend-core/src/components/grid/cells/BBReferenceCell.svelte +++ b/packages/frontend-core/src/components/grid/cells/BBReferenceCell.svelte @@ -4,6 +4,7 @@ import { FieldSubtype, RelationshipType } from "@budibase/types" export let api + export let hideCounter = false const { API } = getContext("grid") const { subtype } = $$props.schema @@ -45,4 +46,5 @@ {schema} {searchFunction} primaryDisplay={"email"} + {hideCounter} /> diff --git a/packages/frontend-core/src/components/grid/cells/BBReferenceSingleCell.svelte b/packages/frontend-core/src/components/grid/cells/BBReferenceSingleCell.svelte index 36a783f584..ed98e2ee08 100644 --- a/packages/frontend-core/src/components/grid/cells/BBReferenceSingleCell.svelte +++ b/packages/frontend-core/src/components/grid/cells/BBReferenceSingleCell.svelte @@ -18,4 +18,5 @@ {...$$restProps} value={arrayValue} onChange={onValueChange} + hideCounter={true} /> diff --git a/packages/frontend-core/src/components/grid/cells/RelationshipCell.svelte b/packages/frontend-core/src/components/grid/cells/RelationshipCell.svelte index bf1fe92ef0..d181fd72e9 100644 --- a/packages/frontend-core/src/components/grid/cells/RelationshipCell.svelte +++ b/packages/frontend-core/src/components/grid/cells/RelationshipCell.svelte @@ -17,6 +17,7 @@ export let contentLines = 1 export let searchFunction = API.searchTable export let primaryDisplay + export let hideCounter = false const color = getColor(0) @@ -276,7 +277,7 @@ {/if} - {#if value?.length} + {#if !hideCounter && value?.length}
{value?.length || 0}