From b01f9510fa5c0885c320d5231a163cb70c1df515 Mon Sep 17 00:00:00 2001 From: xXJSONDeruloXx Date: Sat, 16 Aug 2025 16:09:11 -0400 Subject: fix focusable elements for new profile creation modal --- src/components/ProfileManagement.tsx | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/components/ProfileManagement.tsx b/src/components/ProfileManagement.tsx index 543609f..67f0645 100644 --- a/src/components/ProfileManagement.tsx +++ b/src/components/ProfileManagement.tsx @@ -10,7 +10,8 @@ import { DialogButton, ButtonItem, ModalRoot, - TextField + TextField, + Focusable } from "@decky/ui"; import { getProfiles, @@ -50,8 +51,10 @@ function TextInputModal({ const [value, setValue] = useState(defaultValue); const handleOK = () => { - onOK(value); - closeModal?.(); + if (value.trim()) { + onOK(value); + closeModal?.(); + } }; return ( @@ -74,14 +77,25 @@ function TextInputModal({ -
+ {cancelText} - + {okText} -
+ ); -- cgit v1.2.3