Comments (5)
The project I'm working is from my company, then I can't provide the full code but some screenshots are allowed:
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.
Video.sem.titulo.Feito.com.o.Clipchamp.mp4
This is a video showing the problem
from dropzone-ui-react.
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.
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.
@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)
- bug in remote url data HOT 7
- styling support HOT 2
- Annoying console.log HOT 1
- Selecting same image after delete doesn't work HOT 2
- Multiple Files - FileList HOT 1
- Axios is required. HOT 2
- Unable to upload the same picture with behaviour "replace" after deleting it HOT 4
- dropzone-ui.com is not working HOT 4
- is it't support show the latest selected file only if the maxFiles attribute is set to 1? HOT 2
- React 18 Support HOT 6
- config prop is not working HOT 1
- The content in the children prop should be visible always HOT 3
- MaxFiles issue HOT 5
- Can't use Dropzone in React 18 Typescript HOT 2
- Link is not opening HOT 1
- Footer and Header className prop HOT 2
- Link is not working HOT 1
- Avoid calling githubusercontent to request image icon HOT 3
- Version 7.0.2 "Compiled with problems" HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dropzone-ui-react.