✨ (index.tsx): add value prop to TextOutputView component to display text output value
🐛 (index.tsx): fix typo in TextOutputView component usage
This commit is contained in:
parent
6bbb3688ee
commit
395fbad81a
3 changed files with 12 additions and 3 deletions
|
|
@ -27,7 +27,7 @@ export default function SwitchOutputView(nodeId): JSX.Element {
|
|||
</Case>
|
||||
|
||||
<Case condition={node && checkType() === "object"}>
|
||||
<TextOutputView left={false} flowPool={flowPool} node={node} />
|
||||
<TextOutputView left={false} flowPool={flowPool} node={node} vaç />
|
||||
</Case>
|
||||
|
||||
<Case condition={node && Array.isArray(results)}>
|
||||
|
|
|
|||
|
|
@ -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 (
|
||||
<TextOutputView left={left} node={node} flowPool={flowPool} />
|
||||
<TextOutputView
|
||||
left={left}
|
||||
node={node}
|
||||
flowPool={flowPool}
|
||||
value={textOutputValue}
|
||||
/>
|
||||
);
|
||||
case "PDFOutput":
|
||||
return left ? (
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { Textarea } from "../../../components/ui/textarea";
|
||||
|
||||
const TextOutputView = ({ left, node, flowPool }) => {
|
||||
const TextOutputView = ({ left, node, flowPool, value }) => {
|
||||
return (
|
||||
<>
|
||||
<Textarea
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue