mirror of
https://github.com/leptos-rs/leptos
synced 2024-09-20 14:32:00 +00:00
Fix todomvc
This commit is contained in:
parent
a964e89d1a
commit
9ac0f0a579
1 changed files with 2 additions and 2 deletions
|
@ -262,7 +262,7 @@ pub fn Todo(cx: Scope, todo: Todo) -> impl IntoView {
|
|||
let set_todos = use_context::<WriteSignal<Todos>>(cx).unwrap();
|
||||
|
||||
// this will be filled by _ref=input below
|
||||
let todo_input = NodeRef::new(cx);
|
||||
let todo_input = NodeRef::<HtmlElement<Input>>::new(cx);
|
||||
|
||||
let save = move |value: &str| {
|
||||
let value = value.trim();
|
||||
|
@ -293,7 +293,7 @@ pub fn Todo(cx: Scope, todo: Todo) -> impl IntoView {
|
|||
/>
|
||||
<label on:dblclick=move |_| {
|
||||
set_editing(true);
|
||||
|
||||
|
||||
if let Some(input) = todo_input.get() {
|
||||
_ = input.focus();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue