Skip to content

Commit

Permalink
fix chips width
Browse files Browse the repository at this point in the history
  • Loading branch information
Salam-Dalloul committed Apr 11, 2024
1 parent e27b344 commit 1ecdaca
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions frontend/src/components/Widgets/CustomChipBoxComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import {Box, Chip, Tooltip} from "@mui/material";
import {Option} from "../../types";
import ClearOutlinedIcon from "@mui/icons-material/ClearOutlined";
import React from "react";
import Typography from "@mui/material/Typography";
const CustomChipBoxComponent = ({
selectedOptions,
CustomInputChip,
Expand All @@ -14,7 +15,14 @@ const CustomChipBoxComponent = ({
{ flex: 1,
minWidth: 0,
maxWidth: "fit-content",
cursor: "pointer"
cursor: "pointer",

'& .MuiTypography-root': {
maxWidth: "21rem",
textOverflow: "ellipsis",
whiteSpace: "nowrap",
overflow: "hidden",
}
}:
{cursor: "initial",
width: 'fit-content',
Expand Down Expand Up @@ -45,7 +53,7 @@ const CustomChipBoxComponent = ({
e.stopPropagation();
handleChipRemove(item);
} : undefined}
label={item?.label}
label={<Typography>{item?.label}</Typography>}
/>
)}
</Tooltip>
Expand Down

0 comments on commit 1ecdaca

Please sign in to comment.