make onChange updatable
This commit is contained in:
parent
6f0957aeac
commit
7cf74e733b
1 changed files with 2 additions and 2 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
import { Textarea } from "../../../components/ui/textarea";
|
import { Textarea } from "../../../components/ui/textarea";
|
||||||
|
|
||||||
const TextOutputView = ({ left, value,onChange }) => {
|
const TextOutputView = ({ left, value,onChange }:{left:boolean|undefined,value:any,onChange?:(string)=>void;}) => {
|
||||||
if (typeof value === "object" && Object.keys(value).includes("text")) {
|
if (typeof value === "object" && Object.keys(value).includes("text")) {
|
||||||
value = value.text;
|
value = value.text;
|
||||||
}
|
}
|
||||||
|
|
@ -10,7 +10,7 @@ const TextOutputView = ({ left, value,onChange }) => {
|
||||||
placeholder={"Empty"}
|
placeholder={"Empty"}
|
||||||
// update to real value on flowPool
|
// update to real value on flowPool
|
||||||
value={value}
|
value={value}
|
||||||
onChange={(e) => onChange(e.target.value)}
|
onChange={(e) => {if(onChange) onChange(e.target.value)}}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue