Backend and frontend fixes

This commit is contained in:
2023-01-14 23:58:54 +05:30
parent 46396e2520
commit 20d9a6a2af

View File

@@ -1969,6 +1969,11 @@ async fn PageBar<G: Html>(cx: Scope<'_>) -> View<G> {
let currpg = create_signal(cx, (*app_state.pagenum.get()).to_string()); let currpg = create_signal(cx, (*app_state.pagenum.get()).to_string());
let input_ref = create_node_ref(cx); 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 |_| { let handle_add = move |_| {
if *app_state.pagenum.get() < *app_state.maxpage.get() { if *app_state.pagenum.get() < *app_state.maxpage.get() {
app_state.pagenum.set(*app_state.pagenum.get() + 1); app_state.pagenum.set(*app_state.pagenum.get() + 1);