material-ui-dropzone
material-ui-dropzone copied to clipboard
Initial files is doubling previews in DropzoneDialog
Bug Report
Describe the bug
when passing an array of string length = 1 to initialFiles in the dialog the preview is showing it 2 times
Steps to reproduce
Expected behavior
it should only display it one time
Versions
- OS: [e.g. iOS]
- Browser: [e.g. chrome, safari]
-
@mui/material
version: [e.g. 5.0.2] -
material-ui-dropzone
version: [e.g. 3.0.1]
Additional context
Is this issue still open? I would like to work on it. Thanks!
@ahmadniaz Still happening to me, it seems the file passed from the initialFiles
(even if it's a single file) is being duplicated for some reason, maybe because it's triggering twice in react strict mode.
Here you can see the onChange
handle triggering twice, the second one with 2 uploaded files even if I only passed a single file to initialFiles
:
+1
Any update for this issue?
@ahmadniaz