fix prompt input ctrl + z

This commit is contained in:
Qing
2022-09-22 22:37:41 +08:00
parent 5be91edf9d
commit 5429bf2e87
3 changed files with 17 additions and 3 deletions

View File

@@ -32,12 +32,19 @@ const PromptInput = () => {
}
})
const onKeyUp = (e: React.KeyboardEvent) => {
if (e.key === 'Enter') {
handleRepaintClick()
}
}
return (
<div className="prompt-wrapper">
<TextInput
ref={ref}
value={prompt}
onInput={handleOnInput}
onKeyUp={onKeyUp}
placeholder="I want to repaint of..."
/>
<Button