summaryrefslogtreecommitdiffstats
path: root/examples/toast
diff options
context:
space:
mode:
authorLibravatar Dan Mishin <danila.mishin.2001@gmail.com>2023-03-03 10:01:49 +0300
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2023-04-12 03:55:18 +0200
commitf10e936f00d4b83dcacfdebd2727b1a5cd1add95 (patch)
tree09f0b4bbfa6446003adebc19c79a1368a89eec6c /examples/toast
parentca828f03f5aab9efacc9d63d4149363333035a0c (diff)
downloadiced-f10e936f00d4b83dcacfdebd2727b1a5cd1add95.tar.gz
iced-f10e936f00d4b83dcacfdebd2727b1a5cd1add95.tar.bz2
iced-f10e936f00d4b83dcacfdebd2727b1a5cd1add95.zip
Introduce disabled state for `TextInput`
Diffstat (limited to 'examples/toast')
-rw-r--r--examples/toast/src/main.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/examples/toast/src/main.rs b/examples/toast/src/main.rs
index e74b3ee6..765afb8f 100644
--- a/examples/toast/src/main.rs
+++ b/examples/toast/src/main.rs
@@ -119,13 +119,15 @@ impl Application for App {
column![
subtitle(
"Title",
- text_input("", &self.editing.title, Message::Title)
+ text_input("", &self.editing.title)
+ .on_change(Message::Title)
.on_submit(Message::Add)
.into()
),
subtitle(
"Message",
- text_input("", &self.editing.body, Message::Body)
+ text_input("", &self.editing.body)
+ .on_change(Message::Body)
.on_submit(Message::Add)
.into()
),