From 482e5d60a4b24ce350438c51af35f952ac3a9437 Mon Sep 17 00:00:00 2001 From: antifallobst Date: Mon, 2 Oct 2023 20:23:01 +0200 Subject: [PATCH] feat: preventing enter in signin text fields --- src/topbar/guest/signin.rs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/topbar/guest/signin.rs b/src/topbar/guest/signin.rs index 9a18f2d..214b8f1 100644 --- a/src/topbar/guest/signin.rs +++ b/src/topbar/guest/signin.rs @@ -52,9 +52,7 @@ pub fn SignIn(props: &Props) -> Html { }); let status_callback = props.status_callback.clone(); - let onsubmit = Callback::from(move |event: SubmitEvent| { - event.prevent_default(); - + let onsubmit = Callback::from(move |_| { let state = state.deref().clone(); session.login( @@ -66,7 +64,7 @@ pub fn SignIn(props: &Props) -> Html { }); html! { -
+


@@ -78,12 +76,12 @@ pub fn SignIn(props: &Props) -> Html {
- +

{props.status.clone()}

- +
} }