Fix numeric values creation
authorMichal Klobukowski <michal.klobukowski@contractors.roche.com>
Sun, 21 Oct 2018 20:53:04 +0000 (22:53 +0200)
committerMichal Klobukowski <michal.klobukowski@contractors.roche.com>
Sun, 21 Oct 2018 20:53:04 +0000 (22:53 +0200)
Feature #13862

Arvados-DCO-1.1-Signed-off-by: Michal Klobukowski <michal.klobukowski@contractors.roche.com>

src/views/run-process-panel/inputs/float-array-input.tsx
src/views/run-process-panel/inputs/int-array-input.tsx

index 2b6f48c1a3508fa7667cd8acea0d3af6318d0214..6e546ec844524c279bb6d1fdb0e17bf57a94cd7a 100644 (file)
@@ -47,7 +47,7 @@ class InputComponent extends React.PureComponent<GenericInputProps>{
             orderable
             value={this.props.input.value}
             onChange={this.handleChange}
-            createNewValue={identity}
+            createNewValue={parseFloat}
             inputComponent={FloatInput}
             inputProps={{
                 error: this.props.meta.error,
index a878444bcedf9722d08bf7721833b6d4e1173f59..d1c0273acfcce7f8d3e9d3576b4b117f79666b86 100644 (file)
@@ -47,7 +47,7 @@ class InputComponent extends React.PureComponent<GenericInputProps>{
             orderable
             value={this.props.input.value}
             onChange={this.handleChange}
-            createNewValue={identity}
+            createNewValue={value => parseInt(value, 10)}
             inputComponent={IntInput}
             inputProps={{
                 error: this.props.meta.error,