Skip to content

Commit

Permalink
feat(fe): UI text overflow improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
martinscooper committed Nov 6, 2023
1 parent 8a509a5 commit 49baf8b
Show file tree
Hide file tree
Showing 3 changed files with 157 additions and 110 deletions.
18 changes: 9 additions & 9 deletions frontend/src/components/dropdown/Dropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,7 @@ import MenuItem from "@mui/material/MenuItem/MenuItem";
import Select, { SelectChangeEvent } from "@mui/material/Select";
import InputLabel from "@mui/material/InputLabel";
import classes from "./Dropdown.module.css";
import {
Box,
Chip,
Stack,
SxProps,
Theme,
Typography,
} from "@mui/material";
import { Box, Chip, Stack, SxProps, Theme, Typography } from "@mui/material";
import { ReactNode, useMemo } from "react";

export interface DropdownOption {
Expand Down Expand Up @@ -141,7 +134,14 @@ export const ControlledSelect = ({
MenuProps={MenuProps}
className={value !== "" ? classes.dropdown : classes.dropdown_gray}
disabled={options.length === 0}
sx={sx}
sx={{
"& .MuiSelect-select .MuiTypography-root": {
overflow: "hidden",
whiteSpace: "nowrap",
textOverflow: "ellipsis",
},
...sx,
}}
>
{options?.map((option) => {
if (option.value !== "") {
Expand Down
Loading

0 comments on commit 49baf8b

Please sign in to comment.