Skip to content

Commit

Permalink
Fixed select box size
Browse files Browse the repository at this point in the history
  • Loading branch information
EwanLyon committed Mar 15, 2021
1 parent 044eb0f commit 53bbf89
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
4 changes: 4 additions & 0 deletions src/dashboard/maps.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
body {
margin: 0;
}

.MuiMenu-paper {
max-height: calc(100% - 26px) !important;
}
</style>
</head>
<body>
Expand Down
4 changes: 4 additions & 0 deletions src/dashboard/schedule.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
margin-left: 0;
margin-right: 0;
}

.MuiMenu-paper {
max-height: calc(100% - 32px) !important;
}
</style>
</head>
<body>
Expand Down
10 changes: 2 additions & 8 deletions src/dashboard/setup/maps/veto.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,6 @@ const Divider = styled.div`
margin: 8px 0;
`;

const SelectNoMaxHeight = styled(Select)`
& .MuiMenu-paper {
max-height: 100%;
}
`;

const mapNames = ['Dust2', 'Inferno', 'Mirage', 'Nuke', 'Overpass', 'Train', 'Vertigo'];

const reorder = (list: unknown[], startIndex: number, endIndex: number) => {
Expand Down Expand Up @@ -134,7 +128,7 @@ const DashVeto: React.FC = () => {
<Grid item xs={4}>
<FormControl variant="filled" fullWidth>
<InputLabel id="teamVeto">Team</InputLabel>
<SelectNoMaxHeight
<Select
labelId="teamVeto"
value={teamSelected}
onChange={(e): void => setTeamSelected(e.target.value as string)}>
Expand Down Expand Up @@ -169,7 +163,7 @@ const DashVeto: React.FC = () => {
<MenuItem key="Server" value="Server">
Server
</MenuItem>
</SelectNoMaxHeight>
</Select>
</FormControl>
</Grid>
<Grid
Expand Down

0 comments on commit 53bbf89

Please sign in to comment.