Skip to content

Commit

Permalink
Fix primefaces#2782/primefaces#2363: FileUpload drag and drop
Browse files Browse the repository at this point in the history
  • Loading branch information
melloware committed Apr 21, 2022
1 parent 7d15108 commit ed01587
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/lib/fileupload/FileUpload.js
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ export const FileUpload = React.memo(React.forwardRef((props, ref) => {
event.preventDefault();

const files = event.dataTransfer ? event.dataTransfer.files : event.target.files;
const allowDrop = props.multiple || (files && files.length === 0);
const allowDrop = props.multiple || (ObjectUtils.isEmpty(filesState) && files && files.length === 1);

allowDrop && onFileSelect(event);
}
Expand Down

0 comments on commit ed01587

Please sign in to comment.