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 CHANGED
@@ -483,8 +483,20 @@ 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
- if (initialFiles.length > 0) {
487
- setFiles(initialFiles);
486
+ if (initialFiles && initialFiles.length > 0) {
487
+ const mapped = initialFiles.map((file) => {
488
+ if ("progress" in file) {
489
+ return file;
490
+ }
491
+ return {
492
+ name: file.name,
493
+ size: file.size,
494
+ type: file.type,
495
+ progress: 100,
496
+ uploadError: false
497
+ };
498
+ });
499
+ setFiles(mapped);
488
500
  }
489
501
  }, [initialFiles]);
490
502
  const handleDrop = (event2) => {