We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3f97558 commit cad5bbaCopy full SHA for cad5bba
site/content/examples/09-transitions/06-deferred-transitions/App.svelte
@@ -43,12 +43,6 @@
43
function remove(todo) {
44
todos = todos.filter(t => t !== todo);
45
}
46
-
47
- function handleKeydown(event) {
48
- if (event.which === 13) {
49
- addTodo(event.target);
50
- }
51
52
</script>
53
54
<style>
@@ -114,7 +108,7 @@
114
108
</style>
115
109
116
110
<div class='board'>
117
- <input class="new-todo" placeholder="what needs to be done?" on:enter={add}>
111
+ <input class="new-todo" placeholder="what needs to be done?" on:keydown="{event => event.which === 13 && add(event.target)}">
118
112
119
113
<div class='left'>
120
<h2>todo</h2>
0 commit comments