mirror of
https://github.com/Unleash/unleash.git
synced 2025-07-31 13:47:02 +02:00
fix: text overflow on project users access page (#8853)
Remove scrollbar in project settings - user roles
This commit is contained in:
parent
537ef42f7d
commit
91cebc5afc
@ -4,6 +4,7 @@ import { TooltipLink } from 'component/common/TooltipLink/TooltipLink';
|
|||||||
import { RoleDescription } from 'component/common/RoleDescription/RoleDescription';
|
import { RoleDescription } from 'component/common/RoleDescription/RoleDescription';
|
||||||
import useUiConfig from 'hooks/api/getters/useUiConfig/useUiConfig';
|
import useUiConfig from 'hooks/api/getters/useUiConfig/useUiConfig';
|
||||||
import { styled } from '@mui/material';
|
import { styled } from '@mui/material';
|
||||||
|
import { Truncator } from 'component/common/Truncator/Truncator';
|
||||||
|
|
||||||
const StyledRoleDescriptions = styled('div')(({ theme }) => ({
|
const StyledRoleDescriptions = styled('div')(({ theme }) => ({
|
||||||
display: 'flex',
|
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 = {
|
type TSingleRoleProps = {
|
||||||
value: string;
|
value: string;
|
||||||
role: number;
|
role: number;
|
||||||
@ -50,7 +55,7 @@ export const RoleCell: VFC<TRoleCellProps> = ({ role, roles, value }) => {
|
|||||||
</StyledRoleDescriptions>
|
</StyledRoleDescriptions>
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
{value}
|
<StyledTruncator>{value}</StyledTruncator>
|
||||||
</TooltipLink>
|
</TooltipLink>
|
||||||
</TextCell>
|
</TextCell>
|
||||||
);
|
);
|
||||||
|
@ -173,7 +173,7 @@ export const ProjectAccessTable: VFC = () => {
|
|||||||
row: { original: IProjectAccess };
|
row: { original: IProjectAccess };
|
||||||
value: string;
|
value: string;
|
||||||
}) => <RoleCell value={value} roles={row.entity.roles} />,
|
}) => <RoleCell value={value} roles={row.entity.roles} />,
|
||||||
maxWidth: 125,
|
maxWidth: 175,
|
||||||
filterName: 'role',
|
filterName: 'role',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user