mirror of
https://github.com/adoyle0/thaw.git
synced 2025-01-23 06:19:22 -05:00
🐞 fix: input component value change
This commit is contained in:
parent
277ee00d3d
commit
5a78c1216c
2 changed files with 2 additions and 2 deletions
|
@ -22,7 +22,7 @@ pub fn App(cx: Scope) -> impl IntoView {
|
||||||
});
|
});
|
||||||
view! { cx,
|
view! { cx,
|
||||||
<Space>
|
<Space>
|
||||||
<Input value=count_string.get() on_input=on_input/>
|
<Input value=count_string on_input=on_input/>
|
||||||
<Button on:click=move |_| set_theme.update(move |value| *value = Theme::dark()) type_=button_type>"theme"</Button>
|
<Button on:click=move |_| set_theme.update(move |value| *value = Theme::dark()) type_=button_type>"theme"</Button>
|
||||||
<Button on:click=move |_| set_button_type.update(move |value| *value = ButtonType::PRIMARY)>"click"</Button>
|
<Button on:click=move |_| set_button_type.update(move |value| *value = ButtonType::PRIMARY)>"click"</Button>
|
||||||
<Button on:click=move |_| set_count.update(move |value| *value += 1.0) type_=button_type>"click"</Button>
|
<Button on:click=move |_| set_count.update(move |value| *value += 1.0) type_=button_type>"click"</Button>
|
||||||
|
|
|
@ -21,7 +21,7 @@ pub fn Input(
|
||||||
view! {
|
view! {
|
||||||
cx, class=class_name,
|
cx, class=class_name,
|
||||||
<div class:jo-input=true>
|
<div class:jo-input=true>
|
||||||
<input type="text" prop:value=value.get() ref=input_ref/>
|
<input type="text" prop:value=move || value.get() ref=input_ref/>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue