From f8fdf1ae6f2228b2e9fcae0ab0e14abc6a0b25d7 Mon Sep 17 00:00:00 2001 From: Alexander Zech Date: Fri, 15 Sep 2023 19:36:02 -0700 Subject: [PATCH] chore: add FormControl props to Select --- src/mui/components/select/Select.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/mui/components/select/Select.tsx b/src/mui/components/select/Select.tsx index 004fd9a5..eed3fa72 100644 --- a/src/mui/components/select/Select.tsx +++ b/src/mui/components/select/Select.tsx @@ -1,6 +1,7 @@ +/* eslint-disable react/jsx-props-no-spreading */ import Box from "@mui/material/Box"; import Chip from "@mui/material/Chip"; -import FormControl from "@mui/material/FormControl"; +import FormControl, { FormControlProps } from "@mui/material/FormControl"; import InputLabel from "@mui/material/InputLabel"; import MenuItem from "@mui/material/MenuItem"; import Select, { SelectChangeEvent } from "@mui/material/Select"; @@ -20,6 +21,7 @@ export interface SelectProps { isChips?: boolean; onDelete?: (event: string) => void; getChipLabel?: (value: string) => string; + formControlProps: FormControlProps; } export default function SelectComponent({ id, @@ -33,6 +35,7 @@ export default function SelectComponent({ sx = {}, fontSize = 16, getChipLabel = (value) => value, + formControlProps = {}, }: SelectProps) { const renderValue = isChips ? (selected: string[]) => ( @@ -59,7 +62,7 @@ export default function SelectComponent({ : undefined; return ( - + {label ? ( {label}