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
|
|
@ -93,10 +93,8 @@ where
|
|||
.attr("type", "radio")
|
||||
.attr("style", "margin-right: 10px")
|
||||
.bool_attr("checked", self.is_selected)
|
||||
.on("click", move |root, vdom, _event| {
|
||||
event_bus.publish(on_click.clone(), root);
|
||||
|
||||
vdom.schedule_render();
|
||||
.on("click", move |_root, _vdom, _event| {
|
||||
event_bus.publish(on_click.clone());
|
||||
})
|
||||
.finish(),
|
||||
text(radio_label.into_bump_str()),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue