Skip to content
This repository was archived by the owner on Oct 19, 2018. It is now read-only.

Commit 02b6e1a

Browse files
authored
added key: object_id
1 parent 8ad2494 commit 02b6e1a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,8 @@ Add a new component like this:
469469
class EditItem < Hyperloop::Component
470470
param :todo
471471
render do
472-
INPUT(defaultValue: params.todo.title)
472+
INPUT(defaultValue: params.todo.title, key: params.todo.object_id)
473+
# we will explain 'key: params.todo.object_id later'
473474
.on(:key_down) do |evt|
474475
next unless evt.key_code == 13
475476
params.todo.update(title: evt.target.value)

0 commit comments

Comments
 (0)