From 58543e965e9c3f186f6708d171dc47c9425188a9 Mon Sep 17 00:00:00 2001 From: Stephen Smith Date: Tue, 20 Sep 2022 13:28:02 -0400 Subject: [PATCH] 16073: Hide label column when no params have label Arvados-DCO-1.1-Signed-off-by: Stephen Smith --- src/views/process-panel/process-io-card.tsx | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/views/process-panel/process-io-card.tsx b/src/views/process-panel/process-io-card.tsx index f54fac85..b1cfdb3e 100644 --- a/src/views/process-panel/process-io-card.tsx +++ b/src/views/process-panel/process-io-card.tsx @@ -293,12 +293,13 @@ interface ProcessIOPreviewDataProps { type ProcessIOPreviewProps = ProcessIOPreviewDataProps & WithStyles; const ProcessIOPreview = withStyles(styles)( - ({ classes, data, showImagePreview }: ProcessIOPreviewProps) => - + ({ classes, data, showImagePreview }: ProcessIOPreviewProps) => { + const showLabel = data.some((param: ProcessIOParameter) => param.label); + return
Name - Label + {showLabel && Label} Value Collection @@ -314,7 +315,7 @@ const ProcessIOPreview = withStyles(styles)( {param.id} - {param.label} + {showLabel && {param.label}} {firstVal && } @@ -327,7 +328,7 @@ const ProcessIOPreview = withStyles(styles)( {rest.map((val, i) => ( - + {showLabel && } @@ -341,8 +342,8 @@ const ProcessIOPreview = withStyles(styles)( ; })} -
-); + ; +}); interface ProcessValuePreviewProps { value: ProcessIOValue; -- 2.30.2