Skip to content

Commit a45b66f

Browse files
committed
#1027 Add menu props
1 parent 0e12681 commit a45b66f

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

src/frontend/src/components/ChangeRequestDropdown.tsx

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import { Box, FormLabel, MenuItem, Select, SelectChangeEvent } from '@mui/material';
1+
import { Box, FormControl, FormLabel, MenuItem, Select, SelectChangeEvent } from '@mui/material';
22
import { isWithinInterval, subDays } from 'date-fns';
33
import { Control, Controller } from 'react-hook-form';
44
import { AuthenticatedUser, ChangeRequest, wbsPipe } from 'shared';
55
import { useAllChangeRequests } from '../hooks/change-requests.hooks';
6-
import LoadingIndicator from './LoadingIndicator';
76
import { useCurrentUser } from '../hooks/users.hooks';
7+
import LoadingIndicator from './LoadingIndicator';
88

99
// Filter and sort change requests to display in the dropdown
1010
const getFilteredChangeRequests = (changeRequests: ChangeRequest[], user: AuthenticatedUser): ChangeRequest[] => {
@@ -64,6 +64,16 @@ const ChangeRequestDropdown = ({ control, name }: ChangeRequestDropdownProps) =>
6464
size={'small'}
6565
placeholder={'Change Request Id'}
6666
sx={{ width: 200, textAlign: 'left' }}
67+
MenuProps={{
68+
anchorOrigin: {
69+
vertical: 'bottom',
70+
horizontal: 'right'
71+
},
72+
transformOrigin: {
73+
vertical: 'top',
74+
horizontal: 'right'
75+
}
76+
}}
6777
>
6878
{approvedChangeRequestOptions.map((option) => (
6979
<MenuItem key={option.value} value={option.value}>

0 commit comments

Comments
 (0)