-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Joy] Select popup should have max-height (#36156)
- Loading branch information
1 parent
23556c6
commit 910d3a4
Showing
3 changed files
with
74 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import * as React from 'react'; | ||
import Box from '@mui/joy/Box'; | ||
import Select from '@mui/joy/Select'; | ||
import Option from '@mui/joy/Option'; | ||
import Typography from '@mui/joy/Typography'; | ||
|
||
export default function SelectMinWidth() { | ||
return ( | ||
<Box sx={{ width: 100 }}> | ||
<Select | ||
defaultValue="German Shepherd" | ||
slotProps={{ | ||
listbox: { | ||
placement: 'bottom-start', | ||
sx: { minWidth: 160 }, | ||
}, | ||
}} | ||
> | ||
<Option value="German Shepherd">German Shepherd</Option> | ||
<Option value="Anatolian Shepherd Dog">Anatolian Shepherd Dog</Option> | ||
<Option value="West Highland White Terrier"> | ||
West Highland White Terrier | ||
</Option> | ||
<Option value="Maltese dog">Maltese dog</Option> | ||
</Select> | ||
<Typography level="body3" textAlign="center" sx={{ mt: 1 }}> | ||
Width is fixed at 100px | ||
</Typography> | ||
</Box> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters