diff --git a/frontend/src/components/DataTable.tsx b/frontend/src/components/DataTable.tsx index 0524067f..5427333f 100644 --- a/frontend/src/components/DataTable.tsx +++ b/frontend/src/components/DataTable.tsx @@ -5,6 +5,9 @@ export interface DataTableColumn { key: string; label: string; align?: "left" | "right"; + /** Fixed column width (any CSS length/%), applied via . Requires the table + * to use `table-fixed` (pass it through `class`) for widths to be honored. */ + width?: string; /** Header becomes clickable and shows a sort arrow; click fires onSort(key). */ sortable?: boolean; /** Column is always rendered, ignoring the visibility record. */ @@ -65,6 +68,16 @@ function DataTable(props: DataTableProps) { return ( + c.width)}> + + + {(col) => } + + + + + + @@ -124,7 +137,7 @@ function DataTable(props: DataTableProps) { > {(col) => ( - )} diff --git a/frontend/src/components/EquipmentInventory.tsx b/frontend/src/components/EquipmentInventory.tsx index 3be6ce5e..bf43deeb 100644 --- a/frontend/src/components/EquipmentInventory.tsx +++ b/frontend/src/components/EquipmentInventory.tsx @@ -8,6 +8,7 @@ const EquipmentTable: Component<{ title: string; items: EquipmentItem[] }> = (pr { key: "name", label: props.title, + width: "20%", render: (item) => ( <> {item.name} @@ -67,7 +68,7 @@ const EquipmentTable: Component<{ title: string; items: EquipmentItem[] }> = (pr columns={columns} rows={props.items} rowKey={(item) => item.name} - class="text-xs" + class="table-fixed text-xs" emptyMessage="No equipment data" /> diff --git a/frontend/src/components/ImagingTimeline.tsx b/frontend/src/components/ImagingTimeline.tsx index 64a9f5de..e80b1b8d 100644 --- a/frontend/src/components/ImagingTimeline.tsx +++ b/frontend/src/components/ImagingTimeline.tsx @@ -415,7 +415,7 @@ const ImagingTimeline: Component = (props) => { {/* Bar */}
!isEmpty() && handleBarClick(entry)} diff --git a/frontend/src/components/TopTargets.tsx b/frontend/src/components/TopTargets.tsx index e4cc2fb0..97a0267a 100644 --- a/frontend/src/components/TopTargets.tsx +++ b/frontend/src/components/TopTargets.tsx @@ -18,7 +18,7 @@ const TopTargets: Component<{ targets: TopTarget[] }> = (props) => {
+ {col.render(row)}