Как сделать скролл вертикальный в TextField material ui?
Как сделать скролл вертикальный в TextField material ui?
Хочу добавить скролл вертикальный в TextField, видела решение, что можно заменить его на select, и через menuProps, добавить, но данное решение не подходит. Нужно именно в TextField добавить скролл, как можно это сделать? смотрела api, но не нашла данного свойства. https://codesandbox.io/s/epic-hill-bdhu22?file=/demo.js
import * as React from "react";
import Box from "@mui/material/Box";
import TextField from "@mui/material/TextField";
import MenuItem from "@mui/material/MenuItem";
const currencies = [
{
value: "USD",
label: "$"
},
{
value: "EUR",
label: "€"
},
{
value: "BTC",
label: "฿"
},
{
value: "JPY1",
label: "1"
},
{
value: "JPY2",
label: "2"
},
{
value: "JPY3",
label: "3"
},
{
value: "JPY4",
label: "4"
},
{
value: "JPY",
label: "¥"
}
];
export default function SelectTextFields() {
return (
<Box
component="form"
sx={{
"& .MuiTextField-root": { m: 1, width: "25ch", heigth: "10px" }
}}
noValidate
autoComplete="off"
>
<div>
<TextField
id="outlined-select-currency"
select
label="Select"
defaultValue="EUR"
helperText="Please select your currency"
>
{currencies.map((option) => (
<MenuItem key={option.value} value={option.value}>
{option.label}
</MenuItem>
))}
</TextField>
</div>
</Box>
);
}

