Skip to content

Tags: samuelfullerthomas/react-dropzone

Tags

v11.2.0

Toggle v11.2.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
feat: add {maxFiles} to limit the accepted files

v11.1.0

Toggle v11.1.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
feat: improve Typescript support for errors

v11.0.3

Toggle v11.0.3's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
fix: define functions as properties

This is more correct for TS strict mode.
See info here: https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/method-signature-style.md

It also is compatible with the unbound-method rule.

v11.0.2

Toggle v11.0.2's commit message
fix(examples): rejectedFiles to fileRejections

v11.0.1

Toggle v11.0.1's commit message
fix: react-dropzone#911 isDragActive value when dragging over text on…

… Firefox

v11.0.0

Toggle v11.0.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
feat: add reject reasons to onDrop, onDropRejected callbacks (react-d…

…ropzone#938)

BREAKING CHANGE:

The method signatures of `onDrop` and `onDropRejected` as well as the return value of `useDropzone` were changed in order to add the reasons why rejected files were rejected.

`onDrop` BEFORE this change:
```
onDrop?<T extends File>(acceptedFiles: T[], rejectedFiles: T[], event: DropEvent): void;
```

`onDrop` AFTER this change:
```
onDrop?<T extends File>(acceptedFiles: T[], fileRejections: FileRejection[], event: DropEvent): void;
```

`onDropRejected` BEFORE this change:
```
onDropRejected?<T extends File>(files: T[], event: DropEvent): void;
```

`onDropRejected` AFTER this change:
```
onDropRejected?(fileRejections: FileRejection[], event: DropEvent): void;
```

`rejectedFiles` from the return value of `useDropzone` was replaced with
`fileRejections`.

The defintion of a `FileRejection` is:
```
export interface FileError {
  message: string;
  code: string;
}

export interface FileRejection {
  file: File;
  errors: FileError[];
}
```

v10.2.2

Toggle v10.2.2's commit message
fix: react-dropzone#921 isDragReject consistent with onDrop

v10.2.1

Toggle v10.2.1's commit message
fix: cover for edge cases when checking file size and close react-dro…

…pzone#888

v10.2.0

Toggle v10.2.0's commit message
feat: update deps and close react-dropzone#887

BREAKING CHANGE

Users will need to take care of polyfilling for the final bundle output as the core-js import from  attr-accept has been removed.

v10.1.10

Toggle v10.1.10's commit message
fix: apply min/max file size conditions to {isDragReject} prop (react…

…-dropzone#878)

Previously, `isDragReject` would not trigger if a file exceeded the maximum size. See: react-dropzone#861. This is because it was not checking for size.