From fa26c7bb15b9b225fb555c99cc9ed532027f9ae4 Mon Sep 17 00:00:00 2001 From: Oliver Date: Wed, 18 Nov 2026 01:18:06 +1100 Subject: [PATCH] [ui] improved overflow for table cells (#13312) Closes https://github.com/inventree/InvenTree/issues/13308 --- .../src/components/items/AttachmentLink.tsx | 29 ++++++++++++------- src/frontend/src/styles/overrides.css | 8 +++++ 2 files changed, 27 insertions(+), 10 deletions(-) diff --git a/src/frontend/src/components/items/AttachmentLink.tsx b/src/frontend/src/components/items/AttachmentLink.tsx index 0995ee20c0..8d634038c7 100644 --- a/src/frontend/src/components/items/AttachmentLink.tsx +++ b/src/frontend/src/components/items/AttachmentLink.tsx @@ -1,4 +1,4 @@ -import { Anchor, Group } from '@mantine/core'; +import { Anchor, Box, Group } from '@mantine/core'; import { IconFile, IconFileTypeCsv, @@ -85,16 +85,25 @@ export function AttachmentLink({ }, [attachment, external]); return ( - - {thumbnail ? ( - - ) : external ? ( - - ) : ( - attachmentIcon(attachment) - )} + + + {thumbnail ? ( + + ) : external ? ( + + ) : ( + attachmentIcon(attachment) + )} + {!!attachment ? ( - + {text} ) : ( diff --git a/src/frontend/src/styles/overrides.css b/src/frontend/src/styles/overrides.css index 410aeac98d..2889929c52 100644 --- a/src/frontend/src/styles/overrides.css +++ b/src/frontend/src/styles/overrides.css @@ -29,6 +29,14 @@ table-layout: auto !important; } +/* + * Prevent cell content from overflowing into adjacent columns + * (e.g. when the user has resized a column to a fixed width) + */ +.mantine-datatable-table td { + overflow: hidden; +} + /* * Force mantine table to 100% so columns stretch to fill. */