Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
I
indiscale-files-ui-react
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
caosdb
Software
indiscale-files-ui-react
Commits
8843640e
Commit
8843640e
authored
2 years ago
by
Jose Manuel Serrano Amaut
Browse files
Options
Downloads
Patches
Plain Diff
[REF]: Refactor dropzone children to catch empty array of ext files and display layer
parent
7b129400
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/files-ui/components/dropzone/components/DropzoneChildren/DropzoneChildren.tsx
+4
-1
4 additions, 1 deletion
...dropzone/components/DropzoneChildren/DropzoneChildren.tsx
with
4 additions
and
1 deletion
src/files-ui/components/dropzone/components/DropzoneChildren/DropzoneChildren.tsx
+
4
−
1
View file @
8843640e
...
@@ -16,11 +16,14 @@ const DropzoneChildren: React.FC<DropzoneChildrenProps> = (
...
@@ -16,11 +16,14 @@ const DropzoneChildren: React.FC<DropzoneChildrenProps> = (
props
:
DropzoneChildrenProps
props
:
DropzoneChildrenProps
)
=>
{
)
=>
{
const
{
children
,
label
,
localization
}
=
props
;
const
{
children
,
label
,
localization
}
=
props
;
const
isEmptyArray
=
Array
.
isArray
(
children
)
&&
children
.
length
===
0
;
//console.log("isEmptyArray", isEmptyArray,children);
const
DropzoneLocalizer
:
LocalLabels
=
const
DropzoneLocalizer
:
LocalLabels
=
DropzoneLocalizerSelector
(
localization
);
DropzoneLocalizerSelector
(
localization
);
//children will be always consider as more important
//children will be always consider as more important
if
(
children
)
{
if
(
children
&&
!
isEmptyArray
)
{
return
(
return
(
<
div
className
=
"files-ui-dropzone-children-container"
>
{
children
}
</
div
>
<
div
className
=
"files-ui-dropzone-children-container"
>
{
children
}
</
div
>
);
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment