1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-25 00:07:47 +01:00

fix: text overflow on project users access page (#8853)

Remove scrollbar in project settings - user roles
This commit is contained in:
Tymoteusz Czech 2025-01-10 09:51:42 +01:00 committed by GitHub
parent 537ef42f7d
commit 91cebc5afc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 2 deletions

View File

@ -4,6 +4,7 @@ import { TooltipLink } from 'component/common/TooltipLink/TooltipLink';
import { RoleDescription } from 'component/common/RoleDescription/RoleDescription';
import useUiConfig from 'hooks/api/getters/useUiConfig/useUiConfig';
import { styled } from '@mui/material';
import { Truncator } from 'component/common/Truncator/Truncator';
const StyledRoleDescriptions = styled('div')(({ theme }) => ({
display: 'flex',
@ -15,6 +16,10 @@ const StyledRoleDescriptions = styled('div')(({ theme }) => ({
},
}));
const StyledTruncator = styled(Truncator)(() => ({
display: 'block', // Fix for ellipsis not showing up
}));
type TSingleRoleProps = {
value: string;
role: number;
@ -50,7 +55,7 @@ export const RoleCell: VFC<TRoleCellProps> = ({ role, roles, value }) => {
</StyledRoleDescriptions>
}
>
{value}
<StyledTruncator>{value}</StyledTruncator>
</TooltipLink>
</TextCell>
);

View File

@ -173,7 +173,7 @@ export const ProjectAccessTable: VFC = () => {
row: { original: IProjectAccess };
value: string;
}) => <RoleCell value={value} roles={row.entity.roles} />,
maxWidth: 125,
maxWidth: 175,
filterName: 'role',
},
{