From 744edbd6c17c3c9d872992c84e074f14c8e75a47 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Thu, 28 Jul 2022 03:54:02 +0200 Subject: Focus text inputs in `todos` example --- native/src/widget/text_input.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'native') 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>) -> Self { Self(widget::Id::new(id)) } + + pub fn unique() -> Self { + Self(widget::Id::unique()) + } } pub fn focus(id: Id) -> Command { -- cgit