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.cjs
CHANGED
|
@@ -483,21 +483,10 @@ var Attachment = ({
|
|
|
483
483
|
const [isDragFile, setIsDragFile] = (0, import_react5.useState)(false);
|
|
484
484
|
const inputRef = (0, import_react5.useRef)(null);
|
|
485
485
|
(0, import_react5.useEffect)(() => {
|
|
486
|
-
|
|
487
|
-
setFiles(
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
if (!file.uploadError && file.progress < 100) {
|
|
491
|
-
updated = true;
|
|
492
|
-
return __spreadProps(__spreadValues({}, file), { progress: Math.min(file.progress + 15, 100) });
|
|
493
|
-
}
|
|
494
|
-
return file;
|
|
495
|
-
});
|
|
496
|
-
return updated ? nuevosArchivos : prevFiles;
|
|
497
|
-
});
|
|
498
|
-
}, 1e3);
|
|
499
|
-
return () => clearInterval(interval);
|
|
500
|
-
}, [files]);
|
|
486
|
+
if (initialFiles.length > 0) {
|
|
487
|
+
setFiles(initialFiles);
|
|
488
|
+
}
|
|
489
|
+
}, [initialFiles]);
|
|
501
490
|
const handleDrop = (event2) => {
|
|
502
491
|
event2.preventDefault();
|
|
503
492
|
setIsDragFile(false);
|