Skip to content

Commit

Permalink
fix: only show info box in spreadsheet when there is a reference
Browse files Browse the repository at this point in the history
  • Loading branch information
gventuri committed Oct 11, 2024
1 parent b954665 commit cfa51d6
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions frontend/src/components/DataTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,17 @@ const DataTable: React.FC<DataTableProps> = ({ data }) => {
column: Column<Record<string, any>, unknown>;
}) => {
const hasProcessId = !!props.row.___process_step_id;
const cellContent = props.row[props.column.key];
const showInfoIcon =
hasProcessId &&
cellContent !== "" &&
cellContent !== null &&
cellContent !== undefined;

return (
<div className="relative group h-full flex items-center overflow-hidden">
<span className="truncate">{props.row[props.column.key]}</span>
{hasProcessId && (
<span className="truncate">{cellContent}</span>
{showInfoIcon && (
<div className="absolute inset-y-1 right-1 w-12 bg-gradient-to-l from-[#f9fafb] via-[#f9fafb] to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-300 ease-in-out flex items-center justify-end">
<FaInfoCircle
className="text-primary cursor-pointer mr-2"
Expand Down

0 comments on commit cfa51d6

Please sign in to comment.