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

Updating maxFiles prop does not work #1025

Closed
1 of 2 tasks
ath92 opened this issue Oct 28, 2020 · 1 comment
Closed
1 of 2 tasks

Updating maxFiles prop does not work #1025

ath92 opened this issue Oct 28, 2020 · 1 comment
Labels

Comments

@ath92
Copy link
Contributor

ath92 commented Oct 28, 2020

Do you want to request a feature or report a bug?

  • I found a bug
  • I want to propose a feature

What is the current behavior?
When setting maxFiles to e.g. 5, react-dropzone correctly prevents me from dropping more than 5 files at the same time. However, if I first drop 3 files, then update the maxFiles prop to 2, this update is not taken into account.

If the current behavior is a bug, please provide the steps to reproduce.
https://codesandbox.io/s/wizardly-wing-nxn8d?file=/src/app.js

  1. Drop < 5 files into the dropzone
  2. Drop more files into the dropzone, so that the total exceeds 5
  3. Watch as the files are accepted, despite the amount exceeding maxFiles

What is the expected behavior?
Files in step 2 should be rejected

If this is a feature request, what is motivation or use case for changing the behavior?

Please mention other relevant information such as the browser version, Operating System and react-dropzone version.
version 11.2.2 (as in codesandbox)

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

Successfully merging a pull request may close this issue.

1 participant