Yuvaleros / material-ui-dropzone

A Material-UI file upload dropzone
MIT License
485 stars 245 forks source link

Initial files is doubling previews in DropzoneDialog #363

Open AHD-02 opened 1 year ago

AHD-02 commented 1 year ago

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

Additional context

ahmadniaz commented 1 year ago

Is this issue still open? I would like to work on it. Thanks!

xantorres commented 10 months ago

@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:

image

stayhungry07212 commented 6 months ago

+1

stayhungry07212 commented 5 months ago

Any update for this issue?

stayhungry07212 commented 5 months ago

@ahmadniaz