1
0
mirror of https://github.com/morris/vanilla-todo.git synced 2025-08-21 21:25:25 +02:00

refactor for pure functional business logic

This commit is contained in:
Morris Brodersen
2023-11-30 11:42:02 +01:00
parent 2815a1eb4c
commit dd8dc8c4af
15 changed files with 449 additions and 252 deletions

View File

@@ -50,7 +50,7 @@ export function TodoItem(el) {
el.dispatchEvent(
new CustomEvent('checkTodoItem', {
detail: {
item,
...item,
done: !item.done,
},
bubbles: true,
@@ -121,9 +121,9 @@ export function TodoItem(el) {
}
el.dispatchEvent(
new CustomEvent('saveTodoItem', {
new CustomEvent('editTodoItem', {
detail: {
item,
...item,
label,
},
bubbles: true,