From 9dceda88d05890c98a5eada327cd7dc382122175 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sn=C3=AAu?= <39024711+hoangph271@users.noreply.github.com> Date: Thu, 23 May 2024 21:42:13 +0700 Subject: [PATCH] feat: allow "Enter" key to complete create new list (#15) --- src/app.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/app.rs b/src/app.rs index f3fc347..ad2c189 100644 --- a/src/app.rs +++ b/src/app.rs @@ -304,6 +304,7 @@ impl Application for App { widget::text_input("", name.as_str()) .id(self.dialog_text_input.clone()) .on_input(move |name| Message::DialogUpdate(DialogPage::New(name))) + .on_submit(Message::DialogComplete) .into(), ]) .spacing(spacing.space_xxs), @@ -324,6 +325,7 @@ impl Application for App { .on_input(move |name| { Message::DialogUpdate(DialogPage::Rename { to: name }) }) + .on_submit(Message::DialogComplete) .into(), ]) .spacing(spacing.space_xxs),