diff options
| author | 2021-07-22 20:48:03 +0700 | |
|---|---|---|
| committer | 2021-07-22 20:48:03 +0700 | |
| commit | 587dbbca421bc4b81f883aada063bf854c45f773 (patch) | |
| tree | e212ff72e4ce0a4180b3defacd920865b47025fb /examples/todos | |
| parent | f076649fbb575ee036ab0b3f4511690e3379c115 (diff) | |
| parent | 72d5d9b4bd03f6596369360018ee101a4a3053ae (diff) | |
| download | iced-587dbbca421bc4b81f883aada063bf854c45f773.tar.gz iced-587dbbca421bc4b81f883aada063bf854c45f773.tar.bz2 iced-587dbbca421bc4b81f883aada063bf854c45f773.zip | |
Merge pull request #776 from AldoMX/master
Added `select_all` method to `TextInput`.
Diffstat (limited to 'examples/todos')
| -rw-r--r-- | examples/todos/src/main.rs | 5 | 
1 files changed, 4 insertions, 1 deletions
| diff --git a/examples/todos/src/main.rs b/examples/todos/src/main.rs index 7186b950..97415475 100644 --- a/examples/todos/src/main.rs +++ b/examples/todos/src/main.rs @@ -265,8 +265,11 @@ impl Task {                  self.completed = completed;              }              TaskMessage::Edit => { +                let mut text_input = text_input::State::focused(); +                text_input.select_all(); +                  self.state = TaskState::Editing { -                    text_input: text_input::State::focused(), +                    text_input,                      delete_button: button::State::new(),                  };              } | 
