remove SshKey interface and change object type
[arvados-workbench2.git] / src / views / run-process-panel / inputs / directory-array-input.tsx
index 8a6a729516f80f9b79423d3d61bb02700b1ace1a..6da3210371490e968a041e9bc90adc59b5f2f8e4 100644 (file)
@@ -17,7 +17,6 @@ import { ProjectsTreePicker } from '~/views-components/projects-tree-picker/proj
 import { connect, DispatchProp } from 'react-redux';
 import { initProjectsTreePicker, getSelectedNodes, treePickerActions, getProjectsTreePickerIds, getAllNodes } from '~/store/tree-picker/tree-picker-actions';
 import { ProjectsTreePickerItem } from '~/views-components/projects-tree-picker/generic-projects-tree-picker';
-import { CollectionFile, CollectionFileType } from '~/models/collection-file';
 import { createSelector, createStructuredSelector } from 'reselect';
 import { ChipsInput } from '~/components/chips-input/chips-input';
 import { identity, values, noop } from 'lodash';
@@ -120,7 +119,6 @@ const DirectoryArrayInputComponent = connect(mapStateToProps)(
             this.setState({ open: true });
         }
 
-
         closeDialog = () => {
             this.setState({ open: false });
         }
@@ -215,6 +213,7 @@ const DirectoryArrayInputComponent = connect(mapStateToProps)(
             <ChipsInput
                 value={this.props.input.value}
                 onChange={noop}
+                disabled={this.props.commandInput.disabled}
                 createNewValue={identity}
                 getLabel={(data: FormattedDirectory) => data.name}
                 inputComponent={this.textInput} />
@@ -224,9 +223,10 @@ const DirectoryArrayInputComponent = connect(mapStateToProps)(
                 {...props}
                 error={this.props.meta.touched && !!this.props.meta.error}
                 readOnly
-                onClick={this.openDialog}
-                onKeyPress={this.openDialog}
-                onBlur={this.props.input.onBlur} />
+                onClick={!this.props.commandInput.disabled ? this.openDialog : undefined}
+                onKeyPress={!this.props.commandInput.disabled ? this.openDialog : undefined}
+                onBlur={this.props.input.onBlur}
+                disabled={this.props.commandInput.disabled} />
 
         dialog = () =>
             <Dialog