From 646b6a925bb4fcbda223dc39432ed4b8048edc16 Mon Sep 17 00:00:00 2001 From: Gani Georgiev Date: Sat, 15 Apr 2023 00:47:49 +0300 Subject: [PATCH] limit the number of displayed thumbs in the records listing --- ui/src/components/records/RecordFieldValue.svelte | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ui/src/components/records/RecordFieldValue.svelte b/ui/src/components/records/RecordFieldValue.svelte index 508fb44e..aa097879 100644 --- a/ui/src/components/records/RecordFieldValue.svelte +++ b/ui/src/components/records/RecordFieldValue.svelte @@ -102,10 +102,15 @@ {/if} {:else if field.type === "file"} + {@const files = CommonHelper.toArray(rawValue)} + {@const filesLimit = short ? 10 : 200}
- {#each CommonHelper.toArray(rawValue) as filename, i (i + filename)} + {#each files.slice(0, filesLimit) as filename, i (i + filename)} {/each} + {#if files.length > filesLimit} + ... + {/if}
{:else if short}