Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial files is doubling previews in DropzoneDialog #363

Open
AHD-02 opened this issue Feb 13, 2023 · 5 comments
Open

Initial files is doubling previews in DropzoneDialog #363

AHD-02 opened this issue Feb 13, 2023 · 5 comments

Comments

@AHD-02
Copy link

AHD-02 commented Feb 13, 2023

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

@ahmadniaz
Copy link

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

@xantorres
Copy link

xantorres commented Nov 29, 2023

@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
Copy link

+1

@stayhungry07212
Copy link

Any update for this issue?

@stayhungry07212
Copy link

@ahmadniaz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants