From 604d02cb4e636733c59fa789bcfceb7867a0c6e0 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Thu, 25 Mar 2021 09:45:23 +0000 Subject: [PATCH] Add smart trunctation to all table cell types --- .../src/table/AttachmentRenderer.svelte | 21 ++++++++++++------- .../src/table/RelationshipRenderer.svelte | 21 ++++++++++++------- .../src/table/StringRenderer.svelte | 1 + .../src/table/Table.svelte | 2 -- 4 files changed, 27 insertions(+), 18 deletions(-) diff --git a/packages/standard-components/src/table/AttachmentRenderer.svelte b/packages/standard-components/src/table/AttachmentRenderer.svelte index 12f2b2d938..162e3211ab 100644 --- a/packages/standard-components/src/table/AttachmentRenderer.svelte +++ b/packages/standard-components/src/table/AttachmentRenderer.svelte @@ -1,15 +1,20 @@ -{#if value && value.length} - {#each value as attachment} - {#if attachment.type.startsWith('image')} - {attachment.extension} - {:else} -
{attachment.extension}
- {/if} - {/each} +{#each attachments as attachment} + {#if attachment.type.startsWith('image')} + {attachment.extension} + {:else} +
{attachment.extension}
+ {/if} +{/each} +{#if leftover} +
+{leftover} others
{/if} diff --git a/packages/standard-components/src/table/Table.svelte b/packages/standard-components/src/table/Table.svelte index a41b08b437..b1f2a3ef2e 100644 --- a/packages/standard-components/src/table/Table.svelte +++ b/packages/standard-components/src/table/Table.svelte @@ -192,8 +192,6 @@ justify-content: flex-start; align-items: center; gap: 4px; - max-width: 320px; - overflow: hidden; } .spectrum-Table-sortedIcon { opacity: 0;