From 48d792d76d298bf83911d15dd31d76d1a278f010 Mon Sep 17 00:00:00 2001 From: Carter Date: Mon, 26 May 2025 09:42:39 -0600 Subject: [PATCH] fixed column sizing when all gas readings are visible --- src/pages/Devices.tsx | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/pages/Devices.tsx b/src/pages/Devices.tsx index bc43773..334115d 100644 --- a/src/pages/Devices.tsx +++ b/src/pages/Devices.tsx @@ -59,14 +59,14 @@ const useStyles = makeStyles((theme: Theme) => { margin: theme.spacing(1), marginLeft: theme.spacing(2), display: "flex", - width: theme.spacing(32) + // width: theme.spacing(26) // justifyContent: "center", }, tagsCellContainer: { margin: theme.spacing(1), marginLeft: theme.spacing(2), display: "flex", - width: theme.spacing(24) + width: theme.spacing(18) // justifyContent: "center", }, green: { @@ -382,12 +382,13 @@ export default function Devices() { title: "Description", render: (device: Device) => { const description = device.settings?.description ?? "" + let size = (hasCo2 && !groupGas) ? 26 : 36 return ( - - + + - {description.length > 36 - ? description.substring(0, 36) + "..." + {description.length > size + ? description.substring(0, size) + "..." : description}