Skip to content

Commit 612354b

Browse files
committed
TextField instead of Label
1 parent 6bdc814 commit 612354b

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

services/static-webserver/client/source/class/osparc/study/CreateFunction.js

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,11 +120,12 @@ qx.Class.define("osparc.study.CreateFunction", {
120120
form.add(description, this.tr("Description"), null, "description");
121121

122122

123+
const defaultInputs = {};
123124
const exposedInputs = {};
124125
const exposedOutputs = {};
125126

126127
// INPUTS
127-
const inGrid = new qx.ui.layout.Grid(10, 6);
128+
const inGrid = new qx.ui.layout.Grid(12, 6);
128129
const inputsLayout = new qx.ui.container.Composite(inGrid).set({
129130
allowGrowX: false,
130131
alignX: "left",
@@ -189,8 +190,15 @@ qx.Class.define("osparc.study.CreateFunction", {
189190
parameterExposed.addListener("changeValue", e => exposedInputs[parameter["label"]] = e.getData());
190191
column++;
191192

192-
const parameterDefaultValue = new qx.ui.basic.Label(String(osparc.service.Utils.getParameterValue(parameter)));
193-
inputsLayout.add(parameterDefaultValue, {
193+
const paramValue = osparc.service.Utils.getParameterValue(parameter);
194+
defaultInputs[parameter["label"]] = paramValue;
195+
let ctrl = null;
196+
if (parameterMetadata && osparc.service.Utils.getParameterType(parameterMetadata) === "number") {
197+
ctrl = new qx.ui.form.TextField(String(paramValue));
198+
} else {
199+
ctrl = new qx.ui.basic.Label(String(paramValue));
200+
}
201+
inputsLayout.add(ctrl, {
194202
row,
195203
column,
196204
});

0 commit comments

Comments
 (0)