aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/ScriptingBox.tsx
diff options
context:
space:
mode:
authoranika-ahluwalia <anika.ahluwalia@gmail.com>2020-05-17 17:11:11 -0500
committeranika-ahluwalia <anika.ahluwalia@gmail.com>2020-05-17 17:11:11 -0500
commite862efc40dcc80eba4394e25f20f5ca7353d2b15 (patch)
tree25fd520276146f6c6c6dec904a7980871e3c5973 /src/client/views/nodes/ScriptingBox.tsx
parent39b600c294e3e01daf4dfd902193c0af8535976e (diff)
adjusting params
Diffstat (limited to 'src/client/views/nodes/ScriptingBox.tsx')
-rw-r--r--src/client/views/nodes/ScriptingBox.tsx17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/client/views/nodes/ScriptingBox.tsx b/src/client/views/nodes/ScriptingBox.tsx
index 7ffb0802a..eaf8f0e5b 100644
--- a/src/client/views/nodes/ScriptingBox.tsx
+++ b/src/client/views/nodes/ScriptingBox.tsx
@@ -168,11 +168,18 @@ export class ScriptingBox extends ViewBoxAnnotatableComponent<FieldViewProps, Sc
GetValue={() => ""}
SetValue={value => {
if (value !== "" && value !== " ") {
- this._paramNum++;
- const par = this.compileParams;
- this.compileParams = new List<string>(value.split(";").filter(s => s !== " "));
- this.compileParams.push.apply(this.compileParams, par);
- return true;
+ const parameter = value.split(":");
+ if (parameter[1] !== undefined) {
+ this._errorMessage = "";
+ this._paramNum++;
+ const par = this.compileParams;
+ this.compileParams = new List<string>(value.split(";").filter(s => s !== " "));
+ this.compileParams.push.apply(this.compileParams, par);
+ return true;
+ } else {
+ //this._errorMessage = "must set type of parameter";
+ return false;
+ }
}
return false;
}}