componentes-sinco 1.0.23 → 1.0.24
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 +14 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +14 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -415,8 +415,20 @@ var Attachment = ({
|
|
|
415
415
|
const [isDragFile, setIsDragFile] = useState4(false);
|
|
416
416
|
const inputRef = useRef(null);
|
|
417
417
|
useEffect4(() => {
|
|
418
|
-
if (initialFiles.length > 0) {
|
|
419
|
-
|
|
418
|
+
if (initialFiles && initialFiles.length > 0) {
|
|
419
|
+
const mapped = initialFiles.map((file) => {
|
|
420
|
+
if ("progress" in file) {
|
|
421
|
+
return file;
|
|
422
|
+
}
|
|
423
|
+
return {
|
|
424
|
+
name: file.name,
|
|
425
|
+
size: file.size,
|
|
426
|
+
type: file.type,
|
|
427
|
+
progress: 100,
|
|
428
|
+
uploadError: false
|
|
429
|
+
};
|
|
430
|
+
});
|
|
431
|
+
setFiles(mapped);
|
|
420
432
|
}
|
|
421
433
|
}, [initialFiles]);
|
|
422
434
|
const handleDrop = (event2) => {
|