fix: filtering for buttons

This commit is contained in:
Jonathan Kelley committed 2022-03-13 18:53:20 -04:00
1 parent 71c96a8053
commit 2d2de36eed
2 files changed
+22 -12

No files matched your search

+11 -9
View File
@@ -11,15 +11,17 @@ fn main() {
fn app(cx: Scope) -> Element {
cx.render(rsx! {
div {
h1 { "Form" }
form {
onsubmit: move |ev| println!("Submitted {:?}", ev.values),
oninput: move |ev| println!("Input {:?}", ev.values),
input { r#type: "text", name: "username" }
input { r#type: "text", name: "full-name" }
input { r#type: "password", name: "password" }
button { "Submit the form" }
Router {
div {
h1 { "Form" }
form {
onsubmit: move |ev| println!("Submitted {:?}", ev.values),
oninput: move |ev| println!("Input {:?}", ev.values),
input { r#type: "text", name: "username" }
input { r#type: "text", name: "full-name" }
input { r#type: "password", name: "password" }
button { r#type: "submit", value: "Submit", "Submit the form" }
}
}
}
})