Update todos example to select_all input on edit
This commit is contained in:
parent
c4bca3f2af
commit
a7a4a92466
1 changed files with 5 additions and 1 deletions
|
|
@ -131,7 +131,11 @@ impl Application for Todos {
|
||||||
task.update(task_message);
|
task.update(task_message);
|
||||||
|
|
||||||
if should_focus {
|
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 {
|
} else {
|
||||||
Command::none()
|
Command::none()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue