limit the number of displayed thumbs in the records listing
This commit is contained in:
parent
5ddf9cd443
commit
646b6a925b
|
@ -102,10 +102,15 @@
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
{:else if field.type === "file"}
|
{:else if field.type === "file"}
|
||||||
|
{@const files = CommonHelper.toArray(rawValue)}
|
||||||
|
{@const filesLimit = short ? 10 : 200}
|
||||||
<div class="inline-flex">
|
<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" />
|
<RecordFileThumb {record} {filename} size="sm" />
|
||||||
{/each}
|
{/each}
|
||||||
|
{#if files.length > filesLimit}
|
||||||
|
...
|
||||||
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
{:else if short}
|
{:else if short}
|
||||||
<span class="txt txt-ellipsis" title={CommonHelper.truncate(rawValue)}>
|
<span class="txt txt-ellipsis" title={CommonHelper.truncate(rawValue)}>
|
||||||
|
|
Loading…
Reference in New Issue