diff options
author | Adrián Oliva <adrian.oliva@cimat.mx> | 2023-05-19 15:50:49 -0600 |
---|---|---|
committer | Adrián Oliva <adrian.oliva@cimat.mx> | 2023-05-19 15:50:49 -0600 |
commit | 07491303de190e46b53ade3609c74d826174e60b (patch) | |
tree | 0b6dee677a940836eab314f93171eb4a21cc1e27 /src/ToDo.jsx | |
parent | 8a3f0a6ebcd1585b40ae19fdab8e9f549dad4872 (diff) | |
download | ToDo-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 'src/ToDo.jsx')
-rw-r--r-- | src/ToDo.jsx | 4 |
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} |