Upgrading react-dropzone 18 to 19
Breaking18.3.0 → 19.3.0Breaking2New3Fixed3
BreakingUpgrade verdict
1 breaking change.
In plain terms
- When too many files are dropped, the ones within the limit now come through as accepted instead of the entire drop being rejected.
Must act 1 item needs code or config changes
What you must change
Breaking1
acceptedFiles/onDropAccepted now returns the in-limit files that were previously rejected wholesale.
acceptedFilesonDropAcceptedAPI changes
Generated by DepDelta from published .d.ts files. Not mixed with prose notes.
- changed:
index Accept[key: string]: readonly string[] → index Accept[key: string]: string | readonly string[] - changed:
type DropEvent = React.DragEvent<HTMLElement> | React.ChangeEvent<HTMLInputElement> | DragEvent | Event → type DropEvent = React.DragEvent<HTMLElement> | React.ChangeEvent<HTMLInputElement> | React.ClipboardEvent<HTMLElement> | DragEvent | ClipboardEvent | Event - changed:
type DropzoneOptions = Pick<React.HTMLProps<HTMLElement>, SharedProps> & { accept?: Accept; minSize?: number; maxSize?: number; maxFiles?: number; preventDropOnDocument?: boolean; no… → type DropzoneOptions = Pick<React.HTMLProps<HTMLElement>, SharedProps> & { accept?: Accept | AcceptGroup[]; minSize?: number; maxSize?: number; maxFiles?: number; preventDropOnDocume… - added:
interface AcceptGroup - added:
property AcceptGroup.accept: Accept - added:
property AcceptGroup.description?: string - added:
type ValidatorResult = FileError | readonly FileError[] | null