From 8843640eb99f1740f76c672a03b5cdc9afb41c69 Mon Sep 17 00:00:00 2001
From: Jose Manuel Serrano Amaut <a20122128@pucp.pe>
Date: Mon, 20 Mar 2023 10:04:24 -0500
Subject: [PATCH] [REF]: Refactor dropzone children to catch empty array of ext
 files and display layer

---
 .../components/DropzoneChildren/DropzoneChildren.tsx         | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/files-ui/components/dropzone/components/DropzoneChildren/DropzoneChildren.tsx b/src/files-ui/components/dropzone/components/DropzoneChildren/DropzoneChildren.tsx
index 6440759..f030f56 100644
--- a/src/files-ui/components/dropzone/components/DropzoneChildren/DropzoneChildren.tsx
+++ b/src/files-ui/components/dropzone/components/DropzoneChildren/DropzoneChildren.tsx
@@ -16,11 +16,14 @@ const DropzoneChildren: React.FC<DropzoneChildrenProps> = (
   props: DropzoneChildrenProps
 ) => {
   const { children, label, localization } = props;
+  
+  const isEmptyArray = Array.isArray(children) && children.length===0;
+  //console.log("isEmptyArray", isEmptyArray,children);
   const DropzoneLocalizer: LocalLabels =
     DropzoneLocalizerSelector(localization);
 
   //children will be always consider as more important
-  if (children) {
+  if (children && !isEmptyArray) {
     return (
       <div className="files-ui-dropzone-children-container">{children}</div>
     );
-- 
GitLab