Focus text inputs in todos example

This commit is contained in:
Héctor Ramón Jiménez 2022-07-28 03:54:02 +02:00
parent 52f84e51e9
commit 744edbd6c1
No known key found for this signature in database
GPG key ID: 140CC052C94F138E
3 changed files with 31 additions and 5 deletions

View file

@ -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> {