Currently, if files are dropped and the total file count exceeds the filesLimit, the dropped files that cause the filesLimit to be exceeded are not accessible by the user through any prop. If we look at the relevant code here, we see that we terminate the
function without passing the files to any prop handler like onDrop
I added a new prop that lets the user access the files that cause the filesLimit to be exceeded. Files that are rejected on drop are accessible using the onDropRejected prop - however, onDropRejected does not return dropped files that cause the filesLimit to be exceeded because these files are not rejected by react-dropzone but instead accepted.
Description
Currently, if files are dropped and the total file count exceeds the
filesLimit
, the dropped files that cause thefilesLimit
to be exceeded are not accessible by the user through any prop. If we look at the relevant code here, we see that we terminate the function without passing the files to any prop handler likeonDrop
I added a new prop that lets the user access the files that cause the
filesLimit
to be exceeded. Files that are rejected on drop are accessible using theonDropRejected
prop - however,onDropRejected
does not return dropped files that cause thefilesLimit
to be exceeded because these files are not rejected by react-dropzone but instead accepted.Codesandbox link to demonstrate the bug
Type of change
How Has This Been Tested
Test Configuration:
Checklist