From cfa51d6a478ce92fb29eec4cd44209ad61b7cd20 Mon Sep 17 00:00:00 2001 From: Gabriele Venturi Date: Fri, 11 Oct 2024 17:03:43 +0200 Subject: [PATCH] fix: only show info box in spreadsheet when there is a reference --- frontend/src/components/DataTable.tsx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/DataTable.tsx b/frontend/src/components/DataTable.tsx index 66306da..edd0bb3 100644 --- a/frontend/src/components/DataTable.tsx +++ b/frontend/src/components/DataTable.tsx @@ -58,11 +58,17 @@ const DataTable: React.FC = ({ data }) => { column: Column, unknown>; }) => { const hasProcessId = !!props.row.___process_step_id; + const cellContent = props.row[props.column.key]; + const showInfoIcon = + hasProcessId && + cellContent !== "" && + cellContent !== null && + cellContent !== undefined; return (
- {props.row[props.column.key]} - {hasProcessId && ( + {cellContent} + {showInfoIcon && (