Tags: samuelfullerthomas/react-dropzone
Tags
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.
fix: react-dropzone#911 isDragActive value when dragging over text on… … Firefox
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[]; } ```
fix: cover for edge cases when checking file size and close react-dro… …pzone#888
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.
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.
PreviousNext