Refactor IOOutputView component to use readOnly Textarea
This commit is contained in:
parent
b89439becb
commit
17302a825e
1 changed files with 8 additions and 12 deletions
|
|
@ -32,18 +32,14 @@ export default function IOOutputView({
|
||||||
default:
|
default:
|
||||||
return (
|
return (
|
||||||
<Textarea
|
<Textarea
|
||||||
className="w-full custom-scroll"
|
className={`w-full custom-scroll ${left ? "" : " h-full"}`}
|
||||||
placeholder={"Enter text..."}
|
placeholder={"Empty"}
|
||||||
value={node.data.node!.template["input_value"]}
|
// update to real value on flowPool
|
||||||
onChange={(e) => {
|
value={
|
||||||
e.target.value;
|
(flowPool[node.id] ?? [])[(flowPool[node.id]?.length ?? 1) - 1]
|
||||||
if (node) {
|
?.params ?? ""
|
||||||
let newNode = cloneDeep(node);
|
|
||||||
newNode.data.node!.template["input_value"].value =
|
|
||||||
e.target.value;
|
|
||||||
setNode(node.id, newNode);
|
|
||||||
}
|
}
|
||||||
}}
|
readOnly
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue