KarimMokhtar / react-drag-drop-files

Light and simple Reactjs drag and drop files library to use with very flexible options to change, so you put whatever the design you want for your drop-area. Users can drag and drop or even select the file anywhere in the window.
MIT License
245 stars 86 forks source link

handle change is called 2 times after drag and drop #27

Closed theone3nu closed 2 years ago

theone3nu commented 2 years ago

Steps to reproduce. Drag an image and drop. handleChange getting called twice.

https://codesandbox.io/s/react-drag-drop-files-forked-0z4mm

KarimMokhtar commented 2 years ago

@theone3nu Thank you so much for your contribution. Would you like to solve it and create a PR? btw if you don't have time we gonna solve it in the next push. Thanks again.

theone3nu commented 2 years ago

@KarimMokhtar sure please provide me the access to raise pr.

KarimMokhtar commented 2 years ago

@theone3nu You can just fork the repo and make your changes on the "dev" branch and then you will be able to create PR

theone3nu commented 2 years ago

@KarimMokhtar forked the repo and raised pr. Please review.

theone3nu commented 2 years ago

Thanks. When will be the next release so that i can remove fix from my frontend code in the current app @KarimMokhtar

KarimMokhtar commented 2 years ago

@theone3nu I have published it as a quick fix on version 2.2.4 please check it

Rdeshpande1 commented 2 years ago

Steps to reproduce. Drag an image and drop. handleChange getting called twice.

https://codesandbox.io/s/react-drag-drop-files-forked-0z4mm

Use onDrop method for drag/drop file upload and onSelect method for file selection