mirror of
https://github.com/leptos-rs/book.git
synced 2025-12-27 07:35:38 -05:00
Update 05_forms.md (#172)
Added a missing mention of calling the set() function.
This commit is contained in:
committed by
GitHub
parent
cfa474aaec
commit
3108235f29
@@ -192,7 +192,7 @@ let on_submit = move |ev: SubmitEvent| {
|
||||
};
|
||||
```
|
||||
|
||||
Our `on_submit` handler will access the input’s value and use it to call `set_name`.
|
||||
Our `on_submit` handler will access the input’s value and use it to call `set_name.set()`.
|
||||
To access the DOM node stored in the `NodeRef`, we can simply call it as a function
|
||||
(or using `.get()`). This will return `Option<leptos::HtmlElement<html::Input>>`, but we
|
||||
know that the element has already been mounted (how else did you fire this event!), so
|
||||
|
||||
Reference in New Issue
Block a user