Remove redundant set_value in todomvc example (#530)
This commit is contained in:
parent
568b5b13c8
commit
a770858ec5
|
@ -254,13 +254,7 @@ pub fn Item<G: Html>(cx: Scope, todo: RcSignal<Todo>) -> View<G> {
|
||||||
let event: KeyboardEvent = event.unchecked_into();
|
let event: KeyboardEvent = event.unchecked_into();
|
||||||
match event.key().as_str() {
|
match event.key().as_str() {
|
||||||
"Enter" => handle_blur(),
|
"Enter" => handle_blur(),
|
||||||
"Escape" => {
|
"Escape" => is_editing.set(false),
|
||||||
input_ref
|
|
||||||
.get::<DomNode>()
|
|
||||||
.unchecked_into::<HtmlInputElement>()
|
|
||||||
.set_value(&title());
|
|
||||||
is_editing.set(false);
|
|
||||||
}
|
|
||||||
_ => {}
|
_ => {}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue