- {myData.node?.template[templateParam].type ===
+ {myData.current.node?.template[templateParam].type ===
"str" &&
- !myData.node.template[templateParam].options ? (
+ !myData.current.node.template[templateParam].options ? (
- {myData.node.template[templateParam].list ? (
+ {myData.current.node.template[templateParam].list ? (
{
handleOnNewValue(value, templateParam);
}}
/>
- ) : myData.node.template[templateParam]
+ ) : myData.current.node.template[templateParam]
.multiline ? (
{
@@ -201,11 +199,11 @@ const EditNodeModal = forwardRef(
editNode={true}
disabled={disabled}
password={
- myData.node.template[templateParam]
+ myData.current.node.template[templateParam]
.password ?? false
}
value={
- myData.node.template[templateParam]
+ myData.current.node.template[templateParam]
.value ?? ""
}
onChange={(value) => {
@@ -214,40 +212,40 @@ const EditNodeModal = forwardRef(
/>
)}
- ) : myData.node?.template[templateParam].type ===
+ ) : myData.current.node?.template[templateParam].type ===
"NestedDict" ? (
{
- myData.node!.template[
+ myData.current.node!.template[
templateParam
].value = newValue;
handleOnNewValue(newValue, templateParam);
}}
/>
- ) : myData.node?.template[templateParam].type ===
+ ) : myData.current.node?.template[templateParam].type ===
"dict" ? (
{
const valueToNumbers =
convertValuesToNumbers(newValue);
- myData.node!.template[
+ myData.current.node!.template[
templateParam
].value = valueToNumbers;
setErrorDuplicateKey(
@@ -268,14 +266,14 @@ const EditNodeModal = forwardRef(
}}
/>
- ) : myData.node?.template[templateParam].type ===
+ ) : myData.current.node?.template[templateParam].type ===
"bool" ? (
{" "}
{
handleOnNewValue(
@@ -286,14 +284,14 @@ const EditNodeModal = forwardRef(
size="small"
/>
- ) : myData.node?.template[templateParam].type ===
+ ) : myData.current.node?.template[templateParam].type ===
"float" ? (
{
@@ -301,34 +299,34 @@ const EditNodeModal = forwardRef(
}}
/>
- ) : myData.node?.template[templateParam].type ===
+ ) : myData.current.node?.template[templateParam].type ===
"str" &&
- myData.node.template[templateParam].options ? (
+ myData.current.node.template[templateParam].options ? (
handleOnNewValue(value, templateParam)
}
value={
- myData.node.template[templateParam]
+ myData.current.node.template[templateParam]
.value ?? "Choose an option"
}
>
- ) : myData.node?.template[templateParam].type ===
+ ) : myData.current.node?.template[templateParam].type ===
"int" ? (
{
@@ -336,25 +334,25 @@ const EditNodeModal = forwardRef(
}}
/>
- ) : myData.node?.template[templateParam].type ===
+ ) : myData.current.node?.template[templateParam].type ===
"file" ? (
{
handleOnNewValue(value, templateParam);
}}
fileTypes={
- myData.node.template[templateParam]
+ myData.current.node.template[templateParam]
.fileTypes
}
suffixes={
- myData.node.template[templateParam]
+ myData.current.node.template[templateParam]
.suffixes
}
onFileChange={(filePath: string) => {
@@ -364,19 +362,19 @@ const EditNodeModal = forwardRef(
}}
>
- ) : myData.node?.template[templateParam].type ===
+ ) : myData.current.node?.template[templateParam].type ===
"prompt" ? (
{
- myData.node = nodeClass;
+ myData.current.node = nodeClass;
}}
value={
- myData.node.template[templateParam]
+ myData.current.node.template[templateParam]
.value ?? ""
}
onChange={(value: string | string[]) => {
@@ -384,7 +382,7 @@ const EditNodeModal = forwardRef(
}}
/>
- ) : myData.node?.template[templateParam].type ===
+ ) : myData.current.node?.template[templateParam].type ===
"code" ? (
{
@@ -407,7 +405,7 @@ const EditNodeModal = forwardRef(
}}
/>
- ) : myData.node?.template[templateParam].type ===
+ ) : myData.current.node?.template[templateParam].type ===
"Any" ? (
"-"
) : (
@@ -418,12 +416,13 @@ const EditNodeModal = forwardRef(
+ setEnabled={(e) =>{
changeAdvanced(templateParam)
}
+ }
disabled={disabled}
size="small"
/>
@@ -443,7 +442,8 @@ const EditNodeModal = forwardRef(