diff options
author | 2022-11-11 09:08:52 -0800 | |
---|---|---|
committer | 2022-11-11 09:08:52 -0800 | |
commit | a7a4a92466a4447f8d2e9b5ae2fc715ba6262de0 (patch) | |
tree | c3dbfe3becd2b3d1e3cd9f2cc22598fb1fa22db8 /examples | |
parent | c4bca3f2af7ae9b2c8dfc3af48ab73dad852ed34 (diff) | |
download | iced-a7a4a92466a4447f8d2e9b5ae2fc715ba6262de0.tar.gz iced-a7a4a92466a4447f8d2e9b5ae2fc715ba6262de0.tar.bz2 iced-a7a4a92466a4447f8d2e9b5ae2fc715ba6262de0.zip |
Update todos example to select_all input on edit
Diffstat (limited to 'examples')
-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() } |