From 9613750fd1ff48343e8d80ce5154733a4dbc55d7 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Mon, 5 Jun 2023 12:09:13 -0400 Subject: Enter button on user input --- extension/react-app/src/components/StepContainer.tsx | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) (limited to 'extension/react-app/src/components/StepContainer.tsx') diff --git a/extension/react-app/src/components/StepContainer.tsx b/extension/react-app/src/components/StepContainer.tsx index 903f9b94..f54d4d75 100644 --- a/extension/react-app/src/components/StepContainer.tsx +++ b/extension/react-app/src/components/StepContainer.tsx @@ -23,6 +23,7 @@ import { import { HistoryNode } from "../../../schema/HistoryNode"; import ReactMarkdown from "react-markdown"; import ContinueButton from "./ContinueButton"; +import InputAndButton from "./InputAndButton"; interface StepContainerProps { historyNode: HistoryNode; @@ -177,22 +178,11 @@ function StepContainer(props: StepContainerProps) { )} {props.historyNode.step.name === "Waiting for user input" && ( - { - if (e.key === "Enter") { - props.onUserInput(e.currentTarget.value); - } + { + props.onUserInput(value); }} - type="text" - onSubmit={(ev) => { - props.onUserInput(ev.currentTarget.value); - }} - onClick={(e) => { - e.stopPropagation(); - }} - /> + > )} {props.historyNode.step.name === "Waiting for user confirmation" && ( <> -- cgit v1.2.3-70-g09d2