material-ui-dropzone icon indicating copy to clipboard operation
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?

Open max-carroll opened this issue 4 years ago • 0 comments

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);
        }

max-carroll avatar Jul 23 '20 13:07 max-carroll