diff options
author | anika-ahluwalia <anika.ahluwalia@gmail.com> | 2020-05-17 17:11:11 -0500 |
---|---|---|
committer | anika-ahluwalia <anika.ahluwalia@gmail.com> | 2020-05-17 17:11:11 -0500 |
commit | e862efc40dcc80eba4394e25f20f5ca7353d2b15 (patch) | |
tree | 25fd520276146f6c6c6dec904a7980871e3c5973 /src | |
parent | 39b600c294e3e01daf4dfd902193c0af8535976e (diff) |
adjusting params
Diffstat (limited to 'src')
-rw-r--r-- | src/client/views/nodes/ScriptingBox.tsx | 17 |
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; }} |