From c70b69577adb3a37fae3828b05bcf306af43bcb4 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Wed, 24 Mar 2021 16:29:28 +0000 Subject: [PATCH] Add attachment handling to tables --- .../src/table/AttachmentRenderer.svelte | 29 ++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/packages/standard-components/src/table/AttachmentRenderer.svelte b/packages/standard-components/src/table/AttachmentRenderer.svelte index a169ad2963..a7f2466750 100644 --- a/packages/standard-components/src/table/AttachmentRenderer.svelte +++ b/packages/standard-components/src/table/AttachmentRenderer.svelte @@ -2,4 +2,31 @@ export let value -{value} +{#if value && value.length} + {#each value as attachment} + {#if attachment.type.startsWith('image')} + {attachment.extension} + {:else} +
{attachment.extension}
+ {/if} + {/each} +{/if} + +