Support event subscriptions in iced_web
Also improves the overall web runtime, avoiding nested update loops.
This commit is contained in:
parent
f5186f31f1
commit
6d46833eb2
12 changed files with 112 additions and 129 deletions
|
|
@ -84,9 +84,9 @@ where
|
|||
input(bump)
|
||||
.attr("type", "checkbox")
|
||||
.bool_attr("checked", self.is_checked)
|
||||
.on("click", move |root, vdom, _event| {
|
||||
.on("click", move |_root, vdom, _event| {
|
||||
let msg = on_toggle(!is_checked);
|
||||
event_bus.publish(msg, root);
|
||||
event_bus.publish(msg);
|
||||
|
||||
vdom.schedule_render();
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue