Skip to content

Commit

Permalink
course select fxn for posts in progress
Browse files Browse the repository at this point in the history
  • Loading branch information
lestertai8 committed Jan 14, 2025
1 parent 7c75934 commit a89b093
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions src/components/CourseSelect/CourseSelect.jsx
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;

0 comments on commit a89b093

Please sign in to comment.