Removed redundant code.
This commit is contained in:
1 parent
4d437a8898
commit
eafaa415ec
1 file changed
+1
-5
@@ -2,6 +2,7 @@ import PropTypes from "prop-types";
|
|||||||
import { useTheme } from "@emotion/react";
|
import { useTheme } from "@emotion/react";
|
||||||
import { MenuItem, Select as MuiSelect, Stack, Typography } from "@mui/material";
|
import { MenuItem, Select as MuiSelect, Stack, Typography } from "@mui/material";
|
||||||
import KeyboardArrowDownIcon from "@mui/icons-material/KeyboardArrowDown";
|
import KeyboardArrowDownIcon from "@mui/icons-material/KeyboardArrowDown";
|
||||||
|
|
||||||
import "./index.css";
|
import "./index.css";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -52,9 +53,6 @@ const Select = ({
|
|||||||
}) => {
|
}) => {
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
|
|
||||||
const selectedItem = items.find((item) => item._id === value);
|
|
||||||
const displayName = selectedItem ? selectedItem.name : "";
|
|
||||||
|
|
||||||
const itemStyles = {
|
const itemStyles = {
|
||||||
fontSize: "var(--env-var-font-size-medium)",
|
fontSize: "var(--env-var-font-size-medium)",
|
||||||
color: theme.palette.primary.contrastTextTertiary,
|
color: theme.palette.primary.contrastTextTertiary,
|
||||||
@@ -149,8 +147,6 @@ Select.propTypes = {
|
|||||||
onBlur: PropTypes.func,
|
onBlur: PropTypes.func,
|
||||||
sx: PropTypes.object,
|
sx: PropTypes.object,
|
||||||
labelControlSpacing: PropTypes.number,
|
labelControlSpacing: PropTypes.number,
|
||||||
truncate: PropTypes.bool, // New prop: enable/disable truncation
|
|
||||||
maxTruncateLength: PropTypes.number, // New prop: deafult is 15
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export default Select;
|
export default Select;
|
||||||
Reference in new issue
Block a user