summaryrefslogtreecommitdiffstats
path: root/native/src
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2022-07-28 03:54:02 +0200
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2022-07-28 03:58:46 +0200
commit744edbd6c17c3c9d872992c84e074f14c8e75a47 (patch)
tree31fb7bed8f2d84d89185def0b96e85062e3a158b /native/src
parent52f84e51e90db1c324310565f2aff8b7e6987cba (diff)
downloadiced-744edbd6c17c3c9d872992c84e074f14c8e75a47.tar.gz
iced-744edbd6c17c3c9d872992c84e074f14c8e75a47.tar.bz2
iced-744edbd6c17c3c9d872992c84e074f14c8e75a47.zip
Focus text inputs in `todos` example
Diffstat (limited to 'native/src')
-rw-r--r--native/src/widget/text_input.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/native/src/widget/text_input.rs b/native/src/widget/text_input.rs
index 1ca5ccf2..a81cfaed 100644
--- a/native/src/widget/text_input.rs
+++ b/native/src/widget/text_input.rs
@@ -322,6 +322,10 @@ impl Id {
pub fn new(id: impl Into<std::borrow::Cow<'static, str>>) -> Self {
Self(widget::Id::new(id))
}
+
+ pub fn unique() -> Self {
+ Self(widget::Id::unique())
+ }
}
pub fn focus<Message: 'static>(id: Id) -> Command<Message> {