|
|
@ -43,12 +43,6 @@
|
|
|
|
function remove(todo) {
|
|
|
|
function remove(todo) {
|
|
|
|
todos = todos.filter(t => t !== todo);
|
|
|
|
todos = todos.filter(t => t !== todo);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function handleKeydown(event) {
|
|
|
|
|
|
|
|
if (event.which === 13) {
|
|
|
|
|
|
|
|
addTodo(event.target);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style>
|
|
|
|
<style>
|
|
|
@ -114,7 +108,7 @@
|
|
|
|
</style>
|
|
|
|
</style>
|
|
|
|
|
|
|
|
|
|
|
|
<div class='board'>
|
|
|
|
<div class='board'>
|
|
|
|
<input class="new-todo" placeholder="what needs to be done?" on:enter={add}>
|
|
|
|
<input class="new-todo" placeholder="what needs to be done?" on:keydown="{event => event.which === 13 && add(event.target)}">
|
|
|
|
|
|
|
|
|
|
|
|
<div class='left'>
|
|
|
|
<div class='left'>
|
|
|
|
<h2>todo</h2>
|
|
|
|
<h2>todo</h2>
|
|
|
|