Comments (5)
Here is a workaround that I came up with that solves this issue and also will only set as many files that are set in the maxFiles prop.
const handleDrop = (incommingFiles) => { //TODO: remove workaround once issue is fixed in dropzone-ui/react //This will set the incoming files to the last X files (X = maxFiles prop) if (incommingFiles.length > props.maxFiles) { incommingFiles.splice(0,(incommingFiles.length-props.maxFiles)); } //TODO: remove workaround once issue is fixed in dropzone-ui/react //This will remove the bogus "Max amount" errors in the remaining files error array incommingFiles.map((file)=>{ file.errors = file.errors.filter((x) => ! x.startsWith("Max amount of files (")); file.valid = file.errors.length == 0; }) setFiles(incommingFiles); };
from dropzone-ui-react.
Hi @JinSSJ3 - Thanks for the quick reply but the issue is showing files over the max. See the attached images.
from dropzone-ui-react.
Hey there @cannontechnology . Thanks for notifying us about this issue.
We've just solved the problem in a new version of 🚀 @dropzone-ui/react (V.6.7.10). Please give it a try and let us know if there is something missing in order to fix the issue.
Thanks in advance.
from dropzone-ui-react.
Hey @cannontechnology !
Thanks for the capture.
At this moment that is the expected behaviour, all files are shown to the user and they can remove then individually or all together by clicking the "clean" icon next to the "delete" icon on the right part of dropzone header. It is true that it would be better if <Dropzone/>
component automatically removed all "non valid" files .
Sorry for the inconveninence, but checking our backlog we realized that this feature was already planned to implement. Once we 🚀 add it, we will notify you! ✉️
Thanks in advance.
from dropzone-ui-react.
Thanks again @JinSSJ3. Understood regarding the backlog and appreciate the update. One other thing with the current functionality. If you really wanted that 6th file in my sample above and go to remove the 1st valid file. The 6th (now 5th of 5) file will still have the max files error.
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
- 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
- Last deleted item always comming back HOT 5
- 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.