Tags: workmanw/react-dropzone
Tags
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.
fix: store drag targets in a ref and close react-dropzone#876 (react-… …dropzone#877) This avoids unnecessary renders when drag targets change, which works around an issue where the drag targets get cleared out by the browser when dragging into a child element of the drop zone.
fix: fix open file dialog programmatically and close react-dropzone#853
PreviousNext