[ui] improved overflow for table cells (#13312)

Closes https://github.com/inventree/InvenTree/issues/13308
This commit is contained in:
Oliver authored and GitHub committed 2026-11-18 01:18:06 +11:00
1 parent de39c1626c
commit fa26c7bb15
2 files changed
+27 -10

No files matched your search

@@ -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 (
<Group justify='left' gap='sm' wrap='nowrap'>
{thumbnail ? (
<Thumbnail src={thumbnail} hover size={16} />
) : external ? (
<IconLink />
) : (
attachmentIcon(attachment)
)}
<Group justify='left' gap='sm' wrap='nowrap' miw={0} maw='100%'>
<Box display='flex' style={{ flexShrink: 0 }}>
{thumbnail ? (
<Thumbnail src={thumbnail} hover size={16} />
) : external ? (
<IconLink />
) : (
attachmentIcon(attachment)
)}
</Box>
{!!attachment ? (
<Anchor href={url} target='_blank' rel='noopener noreferrer'>
<Anchor
href={url}
target='_blank'
rel='noopener noreferrer'
title={text}
truncate='end'
miw={0}
>
{text}
</Anchor>
) : (
+8
View File
@@ -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.
*/