summaryrefslogtreecommitdiffstats
path: root/web/src/widget/radio.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2020-02-04 03:28:47 +0100
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2020-02-04 03:28:47 +0100
commit6d46833eb2a068bd3655859ea828dad04293e5ba (patch)
tree42cbe1d9a65a2e03e63887611251ed8532f49872 /web/src/widget/radio.rs
parentf5186f31f1e5eed8fe20c5d6e62e2f531fee6365 (diff)
downloadiced-6d46833eb2a068bd3655859ea828dad04293e5ba.tar.gz
iced-6d46833eb2a068bd3655859ea828dad04293e5ba.tar.bz2
iced-6d46833eb2a068bd3655859ea828dad04293e5ba.zip
Support event subscriptions in `iced_web`
Also improves the overall web runtime, avoiding nested update loops.
Diffstat (limited to '')
-rw-r--r--web/src/widget/radio.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/web/src/widget/radio.rs b/web/src/widget/radio.rs
index 4e7d02b8..6dd0ad45 100644
--- a/web/src/widget/radio.rs
+++ b/web/src/widget/radio.rs
@@ -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()),