summaryrefslogtreecommitdiffstats
path: root/web/src/widget/text_input.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector0193@gmail.com>2020-02-04 10:33:13 -0600
committerLibravatar GitHub <noreply@github.com>2020-02-04 10:33:13 -0600
commit7b892eb3e11596925a2993bcc4175ac09ff3768a (patch)
tree781402db9c2d6ebef5e47b4f469f47eea0396b4b /web/src/widget/text_input.rs
parent12292126dcf9a6e2ac3befeb056638894afce788 (diff)
parent6d46833eb2a068bd3655859ea828dad04293e5ba (diff)
downloadiced-7b892eb3e11596925a2993bcc4175ac09ff3768a.tar.gz
iced-7b892eb3e11596925a2993bcc4175ac09ff3768a.tar.bz2
iced-7b892eb3e11596925a2993bcc4175ac09ff3768a.zip
Merge pull request #177 from hecrj/feature/web-subscriptions
Event subscriptions and custom executors for `iced_web`
Diffstat (limited to 'web/src/widget/text_input.rs')
-rw-r--r--web/src/widget/text_input.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/web/src/widget/text_input.rs b/web/src/widget/text_input.rs
index a478874a..078e05b2 100644
--- a/web/src/widget/text_input.rs
+++ b/web/src/widget/text_input.rs
@@ -175,7 +175,7 @@ where
"type",
bumpalo::format!(in bump, "{}", if self.is_secure { "password" } else { "text" }).into_bump_str(),
)
- .on("input", move |root, vdom, event| {
+ .on("input", move |_root, _vdom, event| {
let text_input = match event.target().and_then(|t| {
t.dyn_into::<web_sys::HtmlInputElement>().ok()
}) {
@@ -183,8 +183,7 @@ where
Some(text_input) => text_input,
};
- event_bus.publish(on_change(text_input.value()), root);
- vdom.schedule_render();
+ event_bus.publish(on_change(text_input.value()));
})
.finish()
}