17782: Fixes almost all tests (4 left) mostly by fixing namespace-type imports.
[arvados-workbench2.git] / src / views / run-process-panel / inputs / int-array-input.tsx
index d1c0273acfcce7f8d3e9d3576b4b117f79666b86..03cb07ea3e1368ec3829e502a2b26376356471f0 100644 (file)
@@ -2,15 +2,14 @@
 //
 // SPDX-License-Identifier: AGPL-3.0
 
-import * as React from 'react';
-import { isRequiredInput, IntArrayCommandInputParameter } from '~/models/workflow';
+import React from 'react';
+import { isRequiredInput, IntArrayCommandInputParameter } from 'models/workflow';
 import { Field } from 'redux-form';
-import { ERROR_MESSAGE } from '~/validators/require';
-import { GenericInputProps, GenericInput } from '~/views/run-process-panel/inputs/generic-input';
-import { ChipsInput } from '~/components/chips-input/chips-input';
-import { identity } from 'lodash';
+import { ERROR_MESSAGE } from 'validators/require';
+import { GenericInputProps, GenericInput } from 'views/run-process-panel/inputs/generic-input';
+import { ChipsInput } from 'components/chips-input/chips-input';
 import { createSelector } from 'reselect';
-import { IntInput } from '~/components/int-input/int-input';
+import { IntInput } from 'components/int-input/int-input';
 
 export interface IntArrayInputProps {
     input: IntArrayCommandInputParameter;
@@ -42,15 +41,17 @@ const IntArrayInputComponent = (props: GenericInputProps) =>
 
 class InputComponent extends React.PureComponent<GenericInputProps>{
     render() {
+        const { commandInput, input, meta } = this.props;
         return <ChipsInput
-            deletable
-            orderable
-            value={this.props.input.value}
+            deletable={!commandInput.disabled}
+            orderable={!commandInput.disabled}
+            disabled={commandInput.disabled}
+            values={input.value}
             onChange={this.handleChange}
             createNewValue={value => parseInt(value, 10)}
             inputComponent={IntInput}
             inputProps={{
-                error: this.props.meta.error,
+                error: meta.error,
             }} />;
     }