Skip to content

Commit 76f7299

Browse files
committed
site: fix deferred-transitions example
1 parent 3f97558 commit 76f7299

File tree

1 file changed

+1
-7
lines changed
  • site/content/examples/09-transitions/06-deferred-transitions

1 file changed

+1
-7
lines changed

site/content/examples/09-transitions/06-deferred-transitions/App.svelte

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,6 @@
4343
function remove(todo) {
4444
todos = todos.filter(t => t !== todo);
4545
}
46-
47-
function handleKeydown(event) {
48-
if (event.which === 13) {
49-
addTodo(event.target);
50-
}
51-
}
5246
</script>
5347

5448
<style>
@@ -114,7 +108,7 @@
114108
</style>
115109

116110
<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)}>
118112

119113
<div class='left'>
120114
<h2>todo</h2>

0 commit comments

Comments
 (0)