Giter VIP home page Giter VIP logo

Comments (5)

LeninBoccardo avatar LeninBoccardo commented on July 17, 2024 1

The project I'm working is from my company, then I can't provide the full code but some screenshots are allowed:
image
image
image
image
image
image

First picture is the variables that control states
Second one is the functions used to handle the dropzone and file Items
Third is the dropzone code
Fourty and fifthy is the FileItems list
Last one is the result

from dropzone-ui-react.

LeninBoccardo avatar LeninBoccardo commented on July 17, 2024 1
Video.sem.titulo.Feito.com.o.Clipchamp.mp4

This is a video showing the problem

from dropzone-ui-react.

JinSSJ3 avatar JinSSJ3 commented on July 17, 2024

Hey there @LeninBoccardo !!!
Thanks for creating the issue.

Unfortunately we couldn't reproduce the behaviour you described. As you can see in the video above we used the complete example .

In order to help you, we kindly ask you to provide us a link to a git repo or a codesandbox (you can fork the "complete example") or even a screenshot of the code.
Thanks in advance.

bandicam.2022-12-21.00-50-04-916.mp4

from dropzone-ui-react.

JinSSJ3 avatar JinSSJ3 commented on July 17, 2024

Hi @LeninBoccardo !!
After checking your code in the screenshots and testing it (we rewrited it in a test project 👀 ).
We found that the error is located in the 2nd picture in the last line. Instead of:

  const getFiles = () => filesData.length && filesData.map((f) => f.file);

you should write:

  const getFiles = () =>  filesData.map((f) => f.file);

Since the value of the filesData.length is 0 when the user deletes all the files one by one, the function getFiles will not be executed correctly and will cause a bug.
Try changing that line and tell us if that worked for you.

Thanks in advance.

from dropzone-ui-react.

LeninBoccardo avatar LeninBoccardo commented on July 17, 2024

@JinSSJ3 , I can't believe such a tiny code was causing all trouble. It worked for me, thanks for your help.

from dropzone-ui-react.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.