From af43e634154a2580cc29507605e4366b75763f39 Mon Sep 17 00:00:00 2001 From: Phil Date: Sun, 30 Jan 2022 14:21:46 +0000 Subject: [PATCH] Blanking Prompt value on close --- src/ui/React/PromptManager.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/ui/React/PromptManager.tsx b/src/ui/React/PromptManager.tsx index 887700db8..2df89406e 100644 --- a/src/ui/React/PromptManager.tsx +++ b/src/ui/React/PromptManager.tsx @@ -26,9 +26,12 @@ export function PromptManager(): React.ReactElement { [], ); + const valueState = useState('') + function close(): void { if (prompt === null) return; prompt.resolve(false); + valueState[1]('') setPrompt(null); } @@ -49,8 +52,6 @@ export function PromptManager(): React.ReactElement { } } - const valueState = useState('') - return ( <> {prompt != null && (