diff options
author | 2022-11-14 00:24:23 +0100 | |
---|---|---|
committer | 2022-11-14 00:24:23 +0100 | |
commit | f5c9f63329ec420757c81ef73ab76e7a8cb2cd2e (patch) | |
tree | 06cd44cdc5abfca94c1acfa10ab0281ae21c4b0c /examples/todos | |
parent | 5f08b8d41ae2d749bd11068f103a0f8ce3abd7bf (diff) | |
parent | a7a4a92466a4447f8d2e9b5ae2fc715ba6262de0 (diff) | |
download | iced-f5c9f63329ec420757c81ef73ab76e7a8cb2cd2e.tar.gz iced-f5c9f63329ec420757c81ef73ab76e7a8cb2cd2e.tar.bz2 iced-f5c9f63329ec420757c81ef73ab76e7a8cb2cd2e.zip |
Merge pull request #1529 from tarkah/feat/text-input-operations
Add text input operations
Diffstat (limited to 'examples/todos')
-rw-r--r-- | examples/todos/src/main.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/examples/todos/src/main.rs b/examples/todos/src/main.rs index be48ae8c..690d9c09 100644 --- a/examples/todos/src/main.rs +++ b/examples/todos/src/main.rs @@ -131,7 +131,11 @@ impl Application for Todos { task.update(task_message); if should_focus { - text_input::focus(Task::text_input_id(i)) + let id = Task::text_input_id(i); + Command::batch(vec![ + text_input::focus(id.clone()), + text_input::select_all(id), + ]) } else { Command::none() } |