From 54d613e00ec2069da2005927aed559014c83c078 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Fri, 15 Aug 2025 12:15:29 +0300 Subject: [PATCH] fix(react/dialogs): prompt not setting default value properly --- apps/client/src/widgets/dialogs/prompt.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/client/src/widgets/dialogs/prompt.tsx b/apps/client/src/widgets/dialogs/prompt.tsx index 90aec4934..60ec94b88 100644 --- a/apps/client/src/widgets/dialogs/prompt.tsx +++ b/apps/client/src/widgets/dialogs/prompt.tsx @@ -33,12 +33,13 @@ function PromptDialogComponent() { const labelRef = useRef(null); const answerRef = useRef(null); const [ opts, setOpts ] = useState(); - const [ value, setValue ] = useState(""); + const [ value, setValue ] = useState(""); const [ shown, setShown ] = useState(false); useTriliumEvent("showPromptDialog", (opts) => { setOpts(opts); setShown(true); + setValue(opts.defaultValue ?? ""); }) return (