From 82b81b51a101c522b9abb80064268438aad9a2bd Mon Sep 17 00:00:00 2001 From: Lawrence Wagerfield Date: Mon, 18 Sep 2023 15:31:58 +0100 Subject: [PATCH] Fix examples --- MIGRATE.md | 6 +++--- README.md | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/MIGRATE.md b/MIGRATE.md index 875caa9..aa556fd 100644 --- a/MIGRATE.md +++ b/MIGRATE.md @@ -62,13 +62,13 @@ const MyDropzoneComponent = () => ( options={options} // Required. width="600px" // Optional. height="375px" // Optional. - onUpdate={files => { + onUpdate={({ uploadedFiles }) => { // Optional. - if (files.length === 0) { + if (uploadedFiles.length === 0) { console.log("No files selected."); } else { console.log("Files uploaded:"); - console.log(files.map(f => f.fileUrl)); + console.log(uploadedFiles.map(f => f.fileUrl)); } }} /> diff --git a/README.md b/README.md index 4ebdfa6..3a228d6 100644 --- a/README.md +++ b/README.md @@ -134,7 +134,7 @@ const options = { const MyApp = () => ( alert(files.map(x => x.fileUrl).join("\n"))} + onUpdate={({ uploadedFiles }) => alert(uploadedFiles.map(x => x.fileUrl).join("\n"))} width="600px" height="375px" /> );