Skip to content

Commit 18935a4

Browse files
committed
feat: Include cell value in title when column widths are constrained
1 parent a84e327 commit 18935a4

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

app/charts/table/cell-desktop.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,12 @@ export const CellDesktop = ({
8080
px: 3,
8181
}}
8282
>
83-
<LinkedCellWrapper cell={cell} columnMeta={columnMeta} links={links}>
83+
<LinkedCellWrapper
84+
cell={cell}
85+
columnMeta={columnMeta}
86+
links={links}
87+
includeValueInTitle={shouldApplyWidthLimits}
88+
>
8489
<Box
8590
component="span"
8691
sx={{

app/charts/table/linked-cell-wrapper.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,13 @@ export const LinkedCellWrapper = ({
4747
cell,
4848
columnMeta,
4949
links,
50+
includeValueInTitle,
5051
}: {
5152
children: ReactNode;
5253
cell: Cell<Observation>;
5354
columnMeta: ColumnMeta;
5455
links: TableLinks;
56+
includeValueInTitle?: boolean;
5557
}) => {
5658
const classes = useStyles();
5759
const isLinkedColumn =
@@ -71,7 +73,7 @@ export const LinkedCellWrapper = ({
7173
className={classes.link}
7274
href={href}
7375
target="_parent"
74-
title={href}
76+
title={includeValueInTitle ? `${cell.value}: ${href}` : href}
7577
style={{ flex: 1, justifyContent: "space-between" }}
7678
>
7779
{children}

0 commit comments

Comments
 (0)