Skip to content

Commit

Permalink
fix: allow validator to be null
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredlll08 committed Feb 8, 2021
1 parent ebe2130 commit 6f0e826
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion typings/react-dropzone.d.ts
Expand Up @@ -34,7 +34,7 @@ export type DropzoneOptions = Pick<React.HTMLProps<HTMLElement>, PropTypes> & {
onDropRejected?: (fileRejections: FileRejection[], event: DropEvent) => void;
getFilesFromEvent?: (event: DropEvent) => Promise<Array<File | DataTransferItem>>;
onFileDialogCancel?: () => void;
validator?: <T extends File>(file: T) => FileError | FileError[];
validator?: <T extends File>(file: T) => FileError | FileError[] | null;
};

export type DropEvent = React.DragEvent<HTMLElement> | React.ChangeEvent<HTMLInputElement> | DragEvent | Event;
Expand Down

0 comments on commit 6f0e826

Please sign in to comment.