From 043db74ea2b3ee13e00820c08fd7919b1d2df966 Mon Sep 17 00:00:00 2001 From: itsscb Date: Wed, 28 Aug 2024 11:10:31 +0200 Subject: [PATCH] feat(frontend): ignores invalid input --- frontend/src/pages/home.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/frontend/src/pages/home.rs b/frontend/src/pages/home.rs index a95c5e7..ccc83da 100644 --- a/frontend/src/pages/home.rs +++ b/frontend/src/pages/home.rs @@ -287,7 +287,13 @@ pub fn Home() -> Html { set_focus(index); } }, - _ => {}, + _ => { + let index = *curr_index; + let mut values = (*input_values).clone(); + + values[index] = String::new(); + input_values.set(values); + }, } }) };