From 07491303de190e46b53ade3609c74d826174e60b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Adri=C3=A1n=20Oliva?= <adrian.oliva@cimat.mx>
Date: Fri, 19 May 2023 15:50:49 -0600
Subject: Apparently `onClick` works better

than `onChange`. If last time was checked, after resetting the form it
still thought it was checked.
---
 src/ToDo.jsx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'src/ToDo.jsx')

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}
-- 
cgit v1.2.3

