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:
@@ -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,
|
||||
|
Reference in New Issue
Block a user