Skip to content
Snippets Groups Projects
Commit 73c044f4 authored by Jose Manuel Serrano Amaut's avatar Jose Manuel Serrano Amaut
Browse files

[FIX]: Solve isse that allows to select or drop files when upload has started.

parent 8992996a
No related branches found
No related tags found
No related merge requests found
...@@ -130,6 +130,7 @@ const Dropzone: React.FC<DropzoneProps> = (props: DropzoneProps) => { ...@@ -130,6 +130,7 @@ const Dropzone: React.FC<DropzoneProps> = (props: DropzoneProps) => {
style: containerStyle, style: containerStyle,
className: containerClassName, className: containerClassName,
} = actionButtons as DropzoneActions; } = actionButtons as DropzoneActions;
const styleBorderRadius: string | number | undefined = style?.borderRadius; const styleBorderRadius: string | number | undefined = style?.borderRadius;
const { const {
...@@ -195,7 +196,6 @@ const Dropzone: React.FC<DropzoneProps> = (props: DropzoneProps) => { ...@@ -195,7 +196,6 @@ const Dropzone: React.FC<DropzoneProps> = (props: DropzoneProps) => {
localization, localization,
validateFilesFlag validateFilesFlag
); );
/** /**
* Uploads each file in the array of ExtFiles * Uploads each file in the array of ExtFiles
* First, sets all the files in preparing status and awaits `preparingTime` miliseconds. * First, sets all the files in preparing status and awaits `preparingTime` miliseconds.
...@@ -570,7 +570,7 @@ const Dropzone: React.FC<DropzoneProps> = (props: DropzoneProps) => { ...@@ -570,7 +570,7 @@ const Dropzone: React.FC<DropzoneProps> = (props: DropzoneProps) => {
// HANDLERS for CLICK, DRAG NAD DROP // HANDLERS for CLICK, DRAG NAD DROP
function handleClick(): void { function handleClick(): void {
//handleClickUtil(evt); //handleClickUtil(evt);
if (!clickable) return; if (!clickable || disabled || isUploading) return;
makeRipple(); makeRipple();
handleClickInput(inputRef.current); handleClickInput(inputRef.current);
} }
...@@ -626,12 +626,12 @@ const Dropzone: React.FC<DropzoneProps> = (props: DropzoneProps) => { ...@@ -626,12 +626,12 @@ const Dropzone: React.FC<DropzoneProps> = (props: DropzoneProps) => {
if (disabled) return; if (disabled) return;
if (isUploading) return;
if (!disableRipple) makeRipple(); if (!disableRipple) makeRipple();
setIsDragging(false); setIsDragging(false);
if (isUploading) return;
let fileList: FileList = evt.dataTransfer.files; let fileList: FileList = evt.dataTransfer.files;
let extFileListOutput: ExtFile[] = fileListToExtFileArray(fileList); let extFileListOutput: ExtFile[] = fileListToExtFileArray(fileList);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment