From 843e3a792ef7c909c5e116cbc290eef87cf30a2d Mon Sep 17 00:00:00 2001 From: Carter Date: Mon, 16 Mar 2026 11:30:29 -0600 Subject: [PATCH 1/2] fixed some placement stuff --- src/common/ResponsiveTable.tsx | 43 ++++++++++++++++++++++------------ 1 file changed, 28 insertions(+), 15 deletions(-) diff --git a/src/common/ResponsiveTable.tsx b/src/common/ResponsiveTable.tsx index 2a4cf1a..f55098b 100644 --- a/src/common/ResponsiveTable.tsx +++ b/src/common/ResponsiveTable.tsx @@ -28,13 +28,12 @@ const useStyles = makeStyles((theme: Theme) => { marginTop: theme.spacing(-2), }, titleComp: { - padding: theme.spacing(1), - marginLeft: theme.spacing(-1) + padding: theme.spacing(1, 1, 0, 1.5), }, subtitleComp: { - padding: theme.spacing(1), - marginTop: theme.spacing(-2), - marginLeft: theme.spacing(-1), + padding: theme.spacing(0, 1, 0.5, 1.5), + display: "flex", + alignItems: "center", }, titleContainer: { border: "none", @@ -42,6 +41,8 @@ const useStyles = makeStyles((theme: Theme) => { searchContainer: { border: "none", textAlign: "right", + display: "flex", + alignItems: "center", }, mobileTitleBox: { margin: theme.spacing(1), @@ -118,8 +119,9 @@ function ResizableHeaderTitle(props: { : {}), }} > - - {column.title} {showOrderIcon(column)} + + {column.title} + {showOrderIcon(column)} ); @@ -491,9 +493,17 @@ export default function ResponsiveTable(props: Props) { const sortKey = column.sortKey ? column.sortKey : column.title.toLowerCase() if (sortKey === orderBy) { if (order === "asc") { - return + return ( + + + + ) } else { - return + return ( + + + + ) } } return null; @@ -553,14 +563,17 @@ export default function ResponsiveTable(props: Props) { {(title || setSearchText) && ( - + - - {renderTitle()} - {renderSubtitle()} - + {renderTitle()} + {renderSubtitle()} - + {actions && actions} From 0ea05bdb725002272a475107a179b7ab6da63e85 Mon Sep 17 00:00:00 2001 From: Carter Date: Mon, 16 Mar 2026 12:30:18 -0600 Subject: [PATCH 2/2] table changes --- src/common/ResponsiveTable.tsx | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/common/ResponsiveTable.tsx b/src/common/ResponsiveTable.tsx index f55098b..b69589e 100644 --- a/src/common/ResponsiveTable.tsx +++ b/src/common/ResponsiveTable.tsx @@ -546,15 +546,19 @@ export default function ResponsiveTable(props: Props) { const clampedWidth = Math.max(MIN_COLUMN_WIDTH, newWidthForIndex) const actualDelta = newWidths[index] - clampedWidth newWidths[index] = clampedWidth - newWidths.every((width, j) => { - if (j <= index || width === 0) return true - else if (newWidths[j] !== undefined) { - newWidths[j] = newWidths[j] + actualDelta - return false - } - }) + + if (actualDelta > 0) { + // Shrinking current column – give space to next column + newWidths[index + 1] = (newWidths[index + 1] ?? 0) + actualDelta + } else if (actualDelta < 0) { + // Growing current column – take from next column only what it can give + const nextWidth = newWidths[index + 1] ?? 0 + const availableFromNext = Math.max(0, nextWidth - MIN_COLUMN_WIDTH) + const takeFromNext = Math.min(-actualDelta, availableFromNext) + newWidths[index + 1] = nextWidth - takeFromNext + // If we couldn't take enough, the table grows (clampedWidth already applied) + } setRowWidths(newWidths) - } const MIN_COLUMN_WIDTH = 24;