File tree 1 file changed +2
-5
lines changed
examples/maudapp/src/components
1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -18,22 +18,19 @@ impl Renderable for TodoList {
18
18
ul id="todo-ul" {
19
19
@for item in & self . items {
20
20
li class={ "todo-item " ( item. complete) } {
21
- input type ="checkbox" checked?[ item. complete] /
21
+ input type ="checkbox" checked?[ item. complete]
22
22
( item. label)
23
23
}
24
24
}
25
25
}
26
- input id="message" type ="text" /
26
+ input id="message" type ="text"
27
27
button { "Add" }
28
28
} ) . into_string ( )
29
29
}
30
30
}
31
31
32
32
impl Component for TodoList {
33
33
fn onload ( view : & View < Self > ) {
34
- // TODO: use view.query("button").on(...)
35
- // but since we don't patch the DOM yet, the attached element
36
- // is always destroyed, so we need to attach the event to a nested selector fo now
37
34
view. on_each ( EventType :: Click , "button" , |mut evt| {
38
35
match evt. binding . query ( "#message" ) {
39
36
Some ( node) => {
You can’t perform that action at this time.
0 commit comments