Skip to content

Commit d132985

Browse files
waleedlatif1claude
andcommitted
fix(tables): remove inline font override in auto-resize, guard undefined columnOrder
- Remove `font:inherit` from measurement span inline style so Tailwind classes (font-medium, text-small) control font properties for accurate column width measurement - Only include columnOrder in metadata update when defined, preventing handleColumnRename from clearing a persisted column order when columnOrderRef is null Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 8eb28da commit d132985

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table

apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table/table.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ export function Table({
266266
if (updatedOrder) setColumnOrder(updatedOrder)
267267
updateMetadataRef.current({
268268
columnWidths: updatedWidths,
269-
columnOrder: updatedOrder,
269+
...(updatedOrder ? { columnOrder: updatedOrder } : {}),
270270
})
271271
}, [])
272272

@@ -758,7 +758,7 @@ export function Table({
758758
let maxWidth = COL_WIDTH_MIN
759759

760760
const measure = document.createElement('span')
761-
measure.style.cssText = 'position:absolute;visibility:hidden;white-space:nowrap;font:inherit'
761+
measure.style.cssText = 'position:absolute;visibility:hidden;white-space:nowrap'
762762
document.body.appendChild(measure)
763763

764764
try {

0 commit comments

Comments
 (0)