Skip to content

Commit

Permalink
limit the number of displayed thumbs in the records listing
Browse files Browse the repository at this point in the history
  • Loading branch information
ganigeorgiev committed Apr 14, 2023
1 parent 5ddf9cd commit 646b6a9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ui/src/components/records/RecordFieldValue.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,15 @@
{/if}
</div>
{:else if field.type === "file"}
{@const files = CommonHelper.toArray(rawValue)}
{@const filesLimit = short ? 10 : 200}
<div class="inline-flex">
{#each CommonHelper.toArray(rawValue) as filename, i (i + filename)}
{#each files.slice(0, filesLimit) as filename, i (i + filename)}
<RecordFileThumb {record} {filename} size="sm" />
{/each}
{#if files.length > filesLimit}
...
{/if}
</div>
{:else if short}
<span class="txt txt-ellipsis" title={CommonHelper.truncate(rawValue)}>
Expand Down

0 comments on commit 646b6a9

Please sign in to comment.