`acceptedFiles` / `rejectedFiles` arrays are not updated when used as function as a child
See original GitHub issueDo you want to request a feature or report a bug?
- I found a bug
- I want to propose a feature
What is the current behavior?
Uploading files doesn’t update the acceptedFiles
/ rejectedFiles
arrays when used as function-as-a-child – they stay as empty arrays. This bug can be seen in the docs: Updating styles and contents based on user input
If the current behavior is a bug, please provide the steps to reproduce.
<Dropzone
accept="image/png"
>
{({ acceptedFiles, rejectedFiles }) => {
return acceptedFiles.length || rejectedFiles.length
? `Accepted ${acceptedFiles.length}, rejected ${rejectedFiles.length} files`
: "Try dropping some cool files.";
}}
</Dropzone>
Verify that dropping / uploading a file does not show the number of accepted or rejected files
What is the expected behavior?
acceptedFiles
/ rejectedFiles
arrays should be populated with files accordingly.
If this is a feature request, what is motivation or use case for changing the behavior?
Please mention other relevant information such as the browser version, Operating System and react-dropzone version. 5.0.1
Issue Analytics
- State:
- Created 5 years ago
- Reactions:8
- Comments:15 (6 by maintainers)
Top GitHub Comments
🎉 This issue has been resolved in version 5.1.1 🎉
The release is available on:
Your semantic-release bot 📦🚀
@nfantone Cool. I haven’t had a chance to look into the issue, but if your patch fixes it I’m sure the maintainers would love a PR.