componentes-sinco 1.0.22 → 1.0.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +4 -15
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +4 -15
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -415,21 +415,10 @@ var Attachment = ({
|
|
|
415
415
|
const [isDragFile, setIsDragFile] = useState4(false);
|
|
416
416
|
const inputRef = useRef(null);
|
|
417
417
|
useEffect4(() => {
|
|
418
|
-
|
|
419
|
-
setFiles(
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
if (!file.uploadError && file.progress < 100) {
|
|
423
|
-
updated = true;
|
|
424
|
-
return __spreadProps(__spreadValues({}, file), { progress: Math.min(file.progress + 15, 100) });
|
|
425
|
-
}
|
|
426
|
-
return file;
|
|
427
|
-
});
|
|
428
|
-
return updated ? nuevosArchivos : prevFiles;
|
|
429
|
-
});
|
|
430
|
-
}, 1e3);
|
|
431
|
-
return () => clearInterval(interval);
|
|
432
|
-
}, [files]);
|
|
418
|
+
if (initialFiles.length > 0) {
|
|
419
|
+
setFiles(initialFiles);
|
|
420
|
+
}
|
|
421
|
+
}, [initialFiles]);
|
|
433
422
|
const handleDrop = (event2) => {
|
|
434
423
|
event2.preventDefault();
|
|
435
424
|
setIsDragFile(false);
|