Skip to content

Svelte 5: input bind:files has visually no two-way-binding #13156

@dm-de

Description

@dm-de

Describe the bug

DOC:
https://svelte-5-preview.vercel.app/docs/breaking-changes#other-breaking-changes-bind-files-values-can-only-be-null-undefined-or-filelist

bind:files is now a two-way binding. As such, when setting a value, it needs to be either falsy (null or undefined) or of type FileList.

But... nothing happen visually if I set files to null
Internally, here is elem.value = '' required, or something

Reproduction

Here is not working example:
LINK

Here is working example with workaround:
LINK

Logs

No response

System Info

5.0.0-next.244

Severity

annoyance

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions