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

Feature: add maxNumberOfFiles prop to ImageDropzone #22

Merged
merged 2 commits into from
Oct 15, 2020

Conversation

ath92
Copy link

@ath92 ath92 commented Oct 14, 2020

This adds a maxNumberOfFiles prop to the ImageDropzone component. It prevents the user from dropping more files than the defined maximum into the dropzone.

Things that changed:

  • Upgraded react-dropzone to latest (5.1.1 -> 11.2.0) to use the newly added maxFiles prop
  • Updated syntax to accommodate the breaking changes introduced in react-dropzone
  • Removed "website to website image drag'n'drop" because it was buggy (and no longer supported by react-dropzone)
  • Adds --disabled modifier class to FileUploadButton wrapper div if it's disabled.

@ath92 ath92 changed the title Feature: add maxNumberOfFiles prop Feature: add maxNumberOfFiles prop to ImageDropzone Oct 14, 2020
@ath92 ath92 requested a review from jaapbakker88 October 15, 2020 07:45
@jaapbakker88 jaapbakker88 merged commit f37027d into master Oct 15, 2020
@delete-merged-branch delete-merged-branch bot deleted the max-attachments branch October 15, 2020 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants