From 73c4b21429951fe2628db2e8d15d1e7de49d1766 Mon Sep 17 00:00:00 2001 From: Florian Scholdei Date: Tue, 29 Oct 2019 14:18:47 +0100 Subject: [PATCH] Hide proxy excludes list when empty --- .../components/table/ArrayConfigTable.tsx | 21 +++++++++++-------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/scm-ui/ui-webapp/src/admin/components/table/ArrayConfigTable.tsx b/scm-ui/ui-webapp/src/admin/components/table/ArrayConfigTable.tsx index 2b1a35a933..71097219a0 100644 --- a/scm-ui/ui-webapp/src/admin/components/table/ArrayConfigTable.tsx +++ b/scm-ui/ui-webapp/src/admin/components/table/ArrayConfigTable.tsx @@ -13,11 +13,12 @@ type Props = { class ArrayConfigTable extends React.Component { render() { const { label, disabled, removeLabel, items, helpText } = this.props; - return ( -
- - - + if(items.length > 0) { + return ( + <> + +
+ {items.map(item => { return ( @@ -33,10 +34,12 @@ class ArrayConfigTable extends React.Component { ); })} - -
-
- ); + + + + ); + } + return null; } removeEntry = (item: string) => {