Use oninput instead of onclick

This commit is contained in:
Denis Kolodin 2017-12-23 21:33:43 +03:00
parent 78b119b1ee
commit 6d1b24d7b2

View File

@ -199,7 +199,7 @@ fn view_entry((idx, entry): (usize, &Entry)) -> Html<Msg> {
html! {
<li>
<div class="view",>
<input class="toggle", type="checkbox", checked=entry.completed, onclick=move|_| Msg::Toggle(idx), />
<input class="toggle", type="checkbox", checked=entry.completed, oninput=move|_| Msg::Toggle(idx), />
<label>{ &entry.description }</label>
<button class="destroy", onclick=move |_| Msg::Remove(idx),></button>
</div>