From e021b55704d55c50ac2be23168a4d9af9b0d49d7 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Fri, 19 Feb 2021 13:05:52 +0000 Subject: [PATCH] Add relationship enrichment display to backend UI --- .../DataTable/cells/RelationshipCell.svelte | 37 ++++++++++++++----- .../Relationship/RelationshipCount.svelte | 4 +- 2 files changed, 30 insertions(+), 11 deletions(-) diff --git a/packages/builder/src/components/backend/DataTable/cells/RelationshipCell.svelte b/packages/builder/src/components/backend/DataTable/cells/RelationshipCell.svelte index 290ff0cf28..2d85a184d9 100644 --- a/packages/builder/src/components/backend/DataTable/cells/RelationshipCell.svelte +++ b/packages/builder/src/components/backend/DataTable/cells/RelationshipCell.svelte @@ -3,24 +3,43 @@ export let row export let selectRelationship - $: count = - row && columnName && Array.isArray(row[columnName]) - ? row[columnName].length - : 0 + $: items = row?.[columnName] || [] -
selectRelationship(row, columnName)}> - {count} - related row(s) +
selectRelationship(row, columnName)}> + {#each items as item} +
{item}
+ {/each}
diff --git a/packages/standard-components/src/grid/Relationship/RelationshipCount.svelte b/packages/standard-components/src/grid/Relationship/RelationshipCount.svelte index ad45e25c3d..6a96a0b90b 100644 --- a/packages/standard-components/src/grid/Relationship/RelationshipCount.svelte +++ b/packages/standard-components/src/grid/Relationship/RelationshipCount.svelte @@ -24,8 +24,8 @@ .item { font-size: var(--font-size-xs); padding: var(--spacing-xs) var(--spacing-s); - border: 1px solid #888; - color: #666; + border: 1px solid var(--grey-5); + color: var(--grey-7); line-height: normal; border-radius: 4px; }