-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
course select fxn for posts in progress
- Loading branch information
1 parent
7c75934
commit a89b093
Showing
1 changed file
with
39 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,39 @@ | ||
import React from 'react'; | ||
import InputLabel from '@mui/material/InputLabel'; | ||
import MenuItem from '@mui/material/MenuItem'; | ||
import FormControl from '@mui/material/FormControl'; | ||
import Select from '@mui/material/Select'; | ||
|
||
|
||
|
||
function CourseSelect() { | ||
const [course, setCourse] = React.useState('All'); // change to 'All' later | ||
|
||
const handleChange = (event) => { | ||
setCourse(event.target.value); | ||
console.log(event.target.value); | ||
}; | ||
|
||
return ( | ||
<div> | ||
<FormControl fullWidth> | ||
<InputLabel id="demo-simple-select-label">Course Filter</InputLabel> | ||
<Select | ||
labelId="demo-simple-select-label" | ||
id="demo-simple-select" | ||
value={course} | ||
label="Course Filter" | ||
onChange={handleChange} | ||
> | ||
<MenuItem value={"All"}>All</MenuItem> | ||
<MenuItem value={10}>Ten</MenuItem> | ||
<MenuItem value={20}>Twenty</MenuItem> | ||
<MenuItem value={30}>Thirty</MenuItem> | ||
</Select> | ||
</FormControl> | ||
</div> | ||
); | ||
} | ||
|
||
export default CourseSelect; | ||
|