feat: add update functionality to useref
This commit is contained in:
1 parent
5502429626
commit
a2b0c50a34
16 files changed
+77
-47
No files matched your search
+2
-2
@@ -57,7 +57,7 @@ const App: FC<()> = |cx, props| {
|
||||
class: "new-todo"
|
||||
placeholder: "What needs to be done?"
|
||||
value: "{draft}"
|
||||
oninput: move |evt| draft.set(evt.value())
|
||||
oninput: move |evt| draft.set(evt.value.clone())
|
||||
}
|
||||
}
|
||||
{todolist}
|
||||
@@ -100,7 +100,7 @@ pub fn TodoEntry<'a>(cx: Context<'a>, props: &TodoEntryProps) -> DomTree<'a> {
|
||||
{is_editing.then(|| rsx!{
|
||||
input {
|
||||
value: "{contents}"
|
||||
oninput: move |evt| contents.set(evt.value())
|
||||
oninput: move |evt| contents.set(evt.value.clone())
|
||||
}
|
||||
})}
|
||||
})
|
||||
|
||||
Reference in new issue
Block a user