feat(front/Field): expose file list

This commit is contained in:
Alice Gaudon 2022-02-28 14:42:36 +01:00
parent 67dc33adf4
commit 7a49e47ae7

View File

@ -89,10 +89,10 @@
input.click();
}
let files: FileList | undefined;
export let fileList: FileList | undefined = undefined;
function handleFileInput() {
files = input.files;
fileList = input.files;
}
let focused = false;
@ -451,9 +451,9 @@
{/if}
{#if type === 'file'}
{#if files}
{#if fileList}
<div class="files">
{#each files as file}
{#each fileList as file}
<div class="file">
<div class="name" title="Type: {file.type}">
<Icon name="file"/> {file.name}