commit 07491303de190e46b53ade3609c74d826174e60b
parent 8a3f0a6ebcd1585b40ae19fdab8e9f549dad4872
Author: Adrián Oliva <[email protected]>
Date: Fri, 19 May 2023 15:50:49 -0600
Apparently `onClick` works better
than `onChange`. If last time was checked, after resetting the form it
still thought it was checked.
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/ToDo.jsx b/src/ToDo.jsx
@@ -108,7 +108,7 @@ export function NewToDo() {
className="form-check-input"
type="checkbox"
id="new-todo-done"
- onChange={(e) =>
+ onClick={(e) =>
set_new_done(e.target.checked)
}
/>
@@ -351,7 +351,7 @@ export function ListToDos() {
className="form-check-input"
type="checkbox"
id="edit-todo-done"
- onChange={(e) =>
+ onClick={(e) =>
set_edit_done(e.target.checked)
}
checked={edit_done}