From 20d9a6a2afc042817b489eaf6a31030d7ef78a9c Mon Sep 17 00:00:00 2001 From: Vinod J M Date: Sat, 14 Jan 2023 23:58:54 +0530 Subject: [PATCH] Backend and frontend fixes --- frontend/src/main.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/frontend/src/main.rs b/frontend/src/main.rs index b203718..48966b1 100644 --- a/frontend/src/main.rs +++ b/frontend/src/main.rs @@ -1969,6 +1969,11 @@ async fn PageBar(cx: Scope<'_>) -> View { let currpg = create_signal(cx, (*app_state.pagenum.get()).to_string()); let input_ref = create_node_ref(cx); + create_effect(cx, || { + // Calling checked.set will also update the `checked` property on the input element. + currpg.set( (*app_state.pagenum.get()).to_string()) + }); + let handle_add = move |_| { if *app_state.pagenum.get() < *app_state.maxpage.get() { app_state.pagenum.set(*app_state.pagenum.get() + 1);