Skip to content

Commit 738ff6f

Browse files
clear fields
1 parent 87c5831 commit 738ff6f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/components/add-note/add-note.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ function AddNote(props: AddNoteProps){
2222
priority,
2323
id: uuidv4()
2424
})
25+
setText('')
26+
setPriority('low')
2527
}
2628

2729
const handleSelect = (e:React.ChangeEvent<HTMLSelectElement>)=>{
@@ -31,7 +33,7 @@ function AddNote(props: AddNoteProps){
3133
return(
3234
<div>
3335
<form className="add-note">
34-
<input type="text" onChange={handleChange}/>
36+
<input type="text" onChange={handleChange} value={text}/>
3537
<select onChange={handleSelect} value={priority}>
3638
<option value="high">High</option>
3739
<option value="medium">Medium</option>

0 commit comments

Comments
 (0)