material-ui-dropzone
material-ui-dropzone copied to clipboard
Refactor deleteFile method (it has a fileObject parameter in the filter method that isn't used) - do we want to tidy this?
The current deleteFile function invoved sending in the fileObject even though its never referenced, do we want to find a way to tidy this up?
// Calculate remaining fileObjects array
const remainingFileObjs = fileObjects.filter((fileObject, i) => {
return i !== removedFileObjIdx;
});
// Notify removed file
if (onDelete) {
onDelete(removedFileObj.file);
}