Update the description of the onDrop prop in DropzoneAreaBase.
Currently, the docs say that onDrop is fired whenever files are dropped onto the dropzone but it's slightly unclear whether onDrop is fired only when the files are accepted, or when the files are accepted or rejected.
If we look at the relevant code herewe see that onDrop is fired only when files are accepted.
I wanted to make this change because if we look at the props for Dropzone in the react-dropzone library, onDrop is fired when the files are either rejected or accepted:
Thus, I thought a user might incorrectly assume DropzoneAreaBase's onDrop to behave similarly to Dropzone's onDrop and expect it to return all dropped files, whether rejected or accepted.
Ideally, I would've liked to rename the onDrop prop to onDropAccepted but that would be a breaking change so I thought updating the docs would suffice. Thank you!
Type of change
Bug fix (non-breaking change which fixes an issue)
How Has This Been Tested
[x] Tested updated docs locally
Test Configuration:
Browser:
Checklist
[x] My code follows the style guidelines of this project
[x] I have performed a self-review of my own code
[x] I have commented my code, particularly in hard-to-understand areas
[x] I have made corresponding changes to the documentation
[x] My changes generate no new warnings
[x] I have added tests that prove my fix is effective or that my feature works
[x] New and existing unit tests pass locally with my changes
[x] Any dependent changes have been merged and published in downstream modules
Description
Update the description of the
onDrop
prop inDropzoneAreaBase
.Currently, the docs say that
onDrop
is fired whenever files are dropped onto the dropzone but it's slightly unclear whetheronDrop
is fired only when the files are accepted, or when the files are accepted or rejected.If we look at the relevant code here we see that
onDrop
is fired only when files are accepted.I wanted to make this change because if we look at the props for Dropzone in the react-dropzone library,
onDrop
is fired when the files are either rejected or accepted:Thus, I thought a user might incorrectly assume DropzoneAreaBase's
onDrop
to behave similarly to Dropzone'sonDrop
and expect it to return all dropped files, whether rejected or accepted.Ideally, I would've liked to rename the
onDrop
prop toonDropAccepted
but that would be a breaking change so I thought updating the docs would suffice. Thank you!Type of change
How Has This Been Tested
Test Configuration:
Checklist