From 395fbad81a838debaaa87141c984b95eca31c9ee Mon Sep 17 00:00:00 2001 From: cristhianzl Date: Thu, 30 May 2024 11:00:03 -0300 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20(index.tsx):=20add=20value=20prop?= =?UTF-8?q?=20to=20TextOutputView=20component=20to=20display=20text=20outp?= =?UTF-8?q?ut=20value=20=F0=9F=90=9B=20(index.tsx):=20fix=20typo=20in=20Te?= =?UTF-8?q?xtOutputView=20component=20usage?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../outputModal/components/switchOutputView/index.tsx | 2 +- .../modals/IOModal/components/IOFieldView/index.tsx | 11 ++++++++++- .../src/shared/components/textOutputView/index.tsx | 2 +- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/frontend/src/customNodes/genericNode/components/outputModal/components/switchOutputView/index.tsx b/src/frontend/src/customNodes/genericNode/components/outputModal/components/switchOutputView/index.tsx index ee09a9983..14c01b2b0 100644 --- a/src/frontend/src/customNodes/genericNode/components/outputModal/components/switchOutputView/index.tsx +++ b/src/frontend/src/customNodes/genericNode/components/outputModal/components/switchOutputView/index.tsx @@ -27,7 +27,7 @@ export default function SwitchOutputView(nodeId): JSX.Element { - + diff --git a/src/frontend/src/modals/IOModal/components/IOFieldView/index.tsx b/src/frontend/src/modals/IOModal/components/IOFieldView/index.tsx index 9d955336d..d0463e041 100644 --- a/src/frontend/src/modals/IOModal/components/IOFieldView/index.tsx +++ b/src/frontend/src/modals/IOModal/components/IOFieldView/index.tsx @@ -45,6 +45,10 @@ export default function IOFieldView({ const [errorDuplicateKey, setErrorDuplicateKey] = useState(false); + const textOutputValue = + (flowPool[node!.id] ?? [])[(flowPool[node!.id]?.length ?? 1) - 1]?.data + .results.result ?? ""; + function handleOutputType() { if (!node) return <>"No node found!"; switch (type) { @@ -158,7 +162,12 @@ export default function IOFieldView({ switch (fieldType) { case "TextOutput": return ( - + ); case "PDFOutput": return left ? ( diff --git a/src/frontend/src/shared/components/textOutputView/index.tsx b/src/frontend/src/shared/components/textOutputView/index.tsx index 5f3aacb37..38d0ca498 100644 --- a/src/frontend/src/shared/components/textOutputView/index.tsx +++ b/src/frontend/src/shared/components/textOutputView/index.tsx @@ -1,6 +1,6 @@ import { Textarea } from "../../../components/ui/textarea"; -const TextOutputView = ({ left, node, flowPool }) => { +const TextOutputView = ({ left, node, flowPool, value }) => { return ( <>