mirror of
https://github.com/inventree/InvenTree.git
synced 2026-11-18 14:07:41 +00:00
[ui] improved overflow for table cells (#13312)
Closes https://github.com/inventree/InvenTree/issues/13308
This commit is contained in:
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>
|
||||
) : (
|
||||
|
||||
@@ -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.
|
||||
*/
|
||||
|
||||
Reference in new issue
Block a user