flowbite-svelte icon indicating copy to clipboard operation
flowbite-svelte copied to clipboard

Cannot clear FileUpload files by setting Fileupload.value = ''

Open jparta opened this issue 7 months ago • 2 comments

Describe the bug

After a successful upload, I want to clear the file picker by setting its value to the empty string. This is not clearing the file name from the picker.

I'm binding to the variables exposed by FileUpload.

<Fileupload
	bind:files={pickedFiles}
	bind:value={filePickerValue}
/>

Reproduction

Stackblitz demo of the issue https://stackblitz.com/~/github.com/jparta/flowbite-svelte-issue-template/tree/jparta/flowbite-issue

Repo https://github.com/jparta/flowbite-svelte-issue-template/tree/jparta/flowbite-issue

Flowbite version and System Info

Stackblitz when I was writing the demo

  System:
    OS: Linux 5.0 undefined
    CPU: (6) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 0 Bytes / 0 Bytes
    Shell: 1.0 - /bin/jsh
  Binaries:
    Node: 18.20.3 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 10.2.3 - /usr/local/bin/npm
    pnpm: 8.15.6 - /usr/local/bin/pnpm
  npmPackages:
    @sveltejs/kit: ^2.5.18 => 2.5.18 
    flowbite-svelte: ^0.46.15 => 0.46.15 
    svelte: 4.2.18 => 4.2.18 
    vite: ^5.3.4 => 5.3.4

jparta avatar Jul 18 '24 17:07 jparta