mirror of
https://github.com/morris/vanilla-todo.git
synced 2025-08-21 13:21:29 +02:00
fix #4
This commit is contained in:
@@ -46,14 +46,14 @@ VT.TodoItemInput = function (el) {
|
|||||||
|
|
||||||
if (label === '') return;
|
if (label === '') return;
|
||||||
|
|
||||||
|
inputEl.value = '';
|
||||||
|
|
||||||
el.dispatchEvent(
|
el.dispatchEvent(
|
||||||
new CustomEvent('addItem', {
|
new CustomEvent('addItem', {
|
||||||
detail: { label: inputEl.value },
|
detail: { label: label },
|
||||||
bubbles: true,
|
bubbles: true,
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
inputEl.value = '';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function clear() {
|
function clear() {
|
||||||
|
Reference in New Issue
Block a user