看起来你在基地使用的是TextField
和select
props ,同时试图直接瞄准MenuProps
props .TextField API没有MenuProps
,但有SelectProps
.试着把你的props 移到那样的地方(这对我使用你的沙箱很有效):
<StyledTextInput
select
defaultValue={"None"}
displayEmpty
SelectProps={{
MenuProps: {
PaperProps: {
sx: {
".MuiList-root": {
paddingTop: "0",
paddingBottom: "0"
}
}
}
}
}}