mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 02:11:05 +00:00
fix(file-uploader): FileUploader
change detail should be File[]
instead of FileList
(#1117)
Fixes #1112
This commit is contained in:
parent
dce0309bab
commit
7602731b0b
7 changed files with 38 additions and 18 deletions
|
@ -8,7 +8,12 @@
|
|||
} from "../types";
|
||||
</script>
|
||||
|
||||
<FileUploaderButton labelText="Add files" />
|
||||
<FileUploaderButton
|
||||
labelText="Add files"
|
||||
on:change="{(e) => {
|
||||
console.log(e.detail); // File[]
|
||||
}}"
|
||||
/>
|
||||
|
||||
<FileUploader
|
||||
multiple
|
||||
|
@ -17,6 +22,15 @@
|
|||
labelDescription="Only JPEG files are accepted."
|
||||
accept="{['.jpg', '.jpeg']}"
|
||||
status="complete"
|
||||
on:add="{(e) => {
|
||||
console.log(e.detail); // File[]
|
||||
}}"
|
||||
on:remove="{(e) => {
|
||||
console.log(e.detail); // File[]
|
||||
}}"
|
||||
on:change="{(e) => {
|
||||
console.log(e.detail); // File[]
|
||||
}}"
|
||||
/>
|
||||
|
||||
<FileUploaderItem name="README.md" status="uploading" />
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue