Skip to content

Commit a9482da

Browse files
committed
fix(tables): contain reference preview within table
1 parent 9b1191e commit a9482da

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table-grid/reference-row-preview.test.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,9 @@ describe('ReferenceRowPreview', () => {
107107
expect(container.textContent).toContain('Acme')
108108
expect(container.textContent).toContain('Enterprise')
109109
expect(container.textContent).not.toContain('Open in sub view')
110+
const previewCell = container.querySelector('tbody > tr > td')
111+
expect(previewCell?.className).toContain('overflow-clip')
112+
expect(previewCell?.className).toContain('border-r')
110113
expect(container.querySelector('td > div')?.className).toContain('sticky left-0')
111114
expect(container.querySelector('td > div')?.className).toContain('w-0')
112115
expect(container.querySelector('td > div')?.className).toContain(

apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table-grid/reference-row-preview.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,10 @@ export const ReferenceRowPreview = memo(function ReferenceRowPreview({
120120

121121
return (
122122
<tr>
123-
<td colSpan={colSpan} className='border-[var(--border)] border-b bg-[var(--surface-2)] p-0'>
123+
<td
124+
colSpan={colSpan}
125+
className='overflow-clip border-[var(--border)] border-r border-b bg-[var(--surface-2)] p-0'
126+
>
124127
<div className='sticky left-0 h-[184px] w-0'>
125128
<div className='flex h-full w-[100cqw] min-w-0 flex-col bg-[var(--surface-2)]'>
126129
<div className='flex h-9 shrink-0 items-center gap-1.5 px-3 text-[var(--text-primary)] text-small'>

0 commit comments

Comments
 (0)