Merge branch '19434-collapse-left-panel' closes #19434
[arvados-workbench2.git] / src / views / run-process-panel / inputs / string-array-input.tsx
index c73b39bfb43ea718f64fdc10ba2113dbf2525e6b..8955009a0d52984a9393b675e9721825f4a746d0 100644 (file)
@@ -2,12 +2,12 @@
 //
 // SPDX-License-Identifier: AGPL-3.0
 
-import * as React from 'react';
-import { isRequiredInput, StringArrayCommandInputParameter } from '~/models/workflow';
+import React from 'react';
+import { isRequiredInput, StringArrayCommandInputParameter } 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 { 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 { createSelector } from 'reselect';
 import { Input } from '@material-ui/core';
@@ -31,7 +31,7 @@ const validationSelector = createSelector(
 );
 
 const required = (value: string[] = []) =>
-    value.length > 0
+    value && value.length > 0
         ? undefined
         : ERROR_MESSAGE;
 
@@ -47,7 +47,7 @@ class InputComponent extends React.PureComponent<GenericInputProps>{
             deletable={!commandInput.disabled}
             orderable={!commandInput.disabled}
             disabled={commandInput.disabled}
-            value={input.value}
+            values={input.value}
             onChange={this.handleChange}
             createNewValue={identity}
             inputComponent={Input}