From d14dd07e55d9832568d7f1580b1c97a0b5f756ec Mon Sep 17 00:00:00 2001
From: JYC333 <22962980+JYC333@users.noreply.github.com>
Date: Mon, 9 Mar 2026 01:38:03 +0000
Subject: [PATCH] refactor: use ctrl+enter to confirm in relation creation at
relation map page
---
apps/client/src/widgets/dialogs/prompt.tsx | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/apps/client/src/widgets/dialogs/prompt.tsx b/apps/client/src/widgets/dialogs/prompt.tsx
index 2ffd5056c3..0a37d0e643 100644
--- a/apps/client/src/widgets/dialogs/prompt.tsx
+++ b/apps/client/src/widgets/dialogs/prompt.tsx
@@ -69,7 +69,7 @@ export default function PromptDialog() {
submitValue.current = null;
opts.current = undefined;
}}
- footer={}
+ footer={}
show={shown}
stackable
>
@@ -78,6 +78,13 @@ export default function PromptDialog() {
inputRef={answerRef}
currentValue={value} onChange={setValue}
readOnly={opts.current?.readOnly}
+ onKeyDown={(e: KeyboardEvent) => {
+ if ((e.ctrlKey || e.metaKey) && e.key === "Enter") {
+ e.preventDefault();
+ submitValue.current = answerRef.current?.value || value;
+ setShown(false);
+ }
+ }}
/>