aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrián Oliva <adrian.oliva@cimat.mx>2023-05-19 15:50:49 -0600
committerAdrián Oliva <adrian.oliva@cimat.mx>2023-05-19 15:50:49 -0600
commit07491303de190e46b53ade3609c74d826174e60b (patch)
tree0b6dee677a940836eab314f93171eb4a21cc1e27
parent8a3f0a6ebcd1585b40ae19fdab8e9f549dad4872 (diff)
downloadToDo-App-FE-07491303de190e46b53ade3609c74d826174e60b.tar.gz
ToDo-App-FE-07491303de190e46b53ade3609c74d826174e60b.zip
Apparently `onClick` works better
than `onChange`. If last time was checked, after resetting the form it still thought it was checked.
Diffstat (limited to '')
-rw-r--r--src/ToDo.jsx4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ToDo.jsx b/src/ToDo.jsx
index 522d3f7..569c8f4 100644
--- 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}