Hide proxy excludes list when empty

This commit is contained in:
Florian Scholdei
2019-10-29 14:18:47 +01:00
parent 19f180d1e1
commit 73c4b21429

View File

@@ -13,8 +13,9 @@ type Props = {
class ArrayConfigTable extends React.Component<Props> {
render() {
const { label, disabled, removeLabel, items, helpText } = this.props;
if(items.length > 0) {
return (
<div>
<>
<LabelWithHelpIcon label={label} helpText={helpText}/>
<table className="table is-hoverable is-fullwidth">
<tbody>
@@ -35,9 +36,11 @@ class ArrayConfigTable extends React.Component<Props> {
})}
</tbody>
</table>
</div>
</>
);
}
return null;
}
removeEntry = (item: string) => {
const newItems = this.props.items.filter(name => name !== item);