Update dependency react-dropzone to v11
This MR contains the following updates:
Package | Change | Age | Adoption | Passing | Confidence |
---|---|---|---|---|---|
react-dropzone | 4.3.0 -> 11.4.2 |
Release Notes
react-dropzone/react-dropzone
v11.4.2
Bug Fixes
- re-export
ErrorCode
from './utils' (2e83d35)
v11.4.1
Bug Fixes
v11.4.0
Features
- ts: export the error codes as an enum (58abc82)
v11.3.5
Bug Fixes
- ignore the vendor dir to avoid licensing issues (7447fd2)
v11.3.4
Bug Fixes
- add the
validator
as dependency to onDropCb (4e625d2)
v11.3.3
Bug Fixes
-
typings: use generics for
getRootProps
andgetInputProps
(27243bc)
v11.3.2
Bug Fixes
v11.3.1
Bug Fixes
- allow validator to be null (6f0e826)
v11.3.0
Features
- add {validator} for custom validation (ebe2130)
v11.2.4
Bug Fixes
v11.2.3
Bug Fixes
v11.2.2
Bug Fixes
v11.2.1
Bug Fixes
v11.2.0
Features
- add {maxFiles} to limit the accepted files (624549c)
v11.1.0
Features
- improve Typescript support for errors (21a412c)
v11.0.3
Bug Fixes
- define functions as properties (dc5c7e2)
v11.0.2
Bug Fixes
- examples: rejectedFiles to fileRejections (19cf778)
v11.0.1
Bug Fixes
v11.0.0
Features
BREAKING CHANGES
- The method signatures of
onDrop
andonDropRejected
as well as the return value ofuseDropzone
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
Bug Fixes
v10.2.1
Bug Fixes
v10.2.0
Features
v10.1.10
Bug Fixes
v10.1.9
Bug Fixes
v10.1.8
Bug Fixes
v10.1.7
Bug Fixes
- allow setting input {disabled} prop to false (acea5df)
v10.1.6
Bug Fixes
v10.1.5
Bug Fixes
- change types to support custom plugins (93bded7)
v10.1.4
Bug Fixes
v10.1.3
Bug Fixes
v10.1.2
Bug Fixes
v10.1.1
Bug Fixes
v10.1.0
Features
v10.0.6
Bug Fixes
v10.0.5
Bug Fixes
v10.0.4
Bug Fixes
v10.0.3
Bug Fixes
v10.0.2
Bug Fixes
v10.0.1
Bug Fixes
v10.0.0
Features
BREAKING CHANGES
- React '>= 16.8' is required.
{getDataTransferItems}
property has been renamed to {getFilesFromEvent}
.
v9.0.0
Bug Fixes
BREAKING CHANGES
- Remove deprecated prop {disableClick}. To prevent the default behavior of click just use idiomatic js:
<Dropzone>
{({getRootProps}) => (
<div {...getRootProps({onClick: evt => evt.preventDefault()})}>
Drop some files here
</div>
)}
</Dropzone>
v8.2.0
Features
- add support for folder drag 'n' drop (2fc6e06)
v8.1.0
Features
- use native {defaultPrevented} and {cancelBubble} (db88425)
v8.0.4
Bug Fixes
v8.0.3
Bug Fixes
v8.0.2
Bug Fixes
v8.0.1
Bug Fixes
- allow drag drop while file select dialog is opened (c8e3ad1)
v8.0.0
Features
BREAKING CHANGES
- The
<Dropzone>
component now requires a rendering function, either provided as the children or as a prop.
Before:
<Dropzone />
After:
<Dropzone>
{({getRootProps}) => <div {...getRootProps()} />}
</Dropzone>
v7.0.1
Bug Fixes
v7.0.0
Code Refactoring
BREAKING CHANGES
- File{preview} has been removed to avoid possible memory leaks
If you wish to create previews, you can easily achieve this in the onDrop()
callback:
class MyZone extends React.Component {
onDrop = files => {
this.setState({
files: files.map(file => ({
...file,
preview: URL.createObjectURL(file)
}))
});
}
cleanup = () => {
// Revoke data uris when done using the previews
const {files} = this.state;
for (const file of files) {
URL.revokeObjectURL(file.preview);
}
}
render() {
return (
<Dropzone onDrop={this.onDrop} />
);
}
}
v6.2.4
Bug Fixes
v6.2.3
Bug Fixes
- fix types for getDataTransferItems() (14e6b67)
v6.2.2
Bug Fixes
v6.2.1
Bug Fixes
v6.2.0
Features
- improve TypeScript setup (5fedd14)
v6.1.3
Bug Fixes
v6.1.2
Bug Fixes
- pass event to user-supplied inputProps {onClick} (fd99719)
v6.1.1
Bug Fixes
v6.1.0
Features
v6.0.4
Bug Fixes
- edge: drag a link trigger drop event (d6cc063)
v6.0.3
Bug Fixes
- update folder drop example (f016c8d)
v6.0.2
Bug Fixes
- fix a regression introduced by #619 (#678) (a5d7211), closes /github.com/react-dropzone/react-dropzone/pull/619#issuecomment-426573278
v6.0.1
Bug Fixes
v6.0.0
Bug Fixes
BREAKING CHANGES
- Callbacks won't get executed for non-file items anymore i.e. if items aren't of type
File
when react-dropzone will ignore them.
v5.1.1
Bug Fixes
- set accepted/rejected files state on drop (cb99c8a)
v5.1.0
Features
v5.0.2
Bug Fixes
v5.0.1
Bug Fixes
v5.0.0
Bug Fixes
BREAKING CHANGES
- This can break applications that rely on the current behavior.
Configuration
-
If you want to rebase/retry this MR, click this checkbox.
This MR has been generated by Renovate Bot.