remove SshKey interface and change object type
[arvados-workbench2.git] / src / views / run-process-panel / inputs / directory-array-input.tsx
index d4f4cb6d3767e536d53dd180e059eaa972042741..6da3210371490e968a041e9bc90adc59b5f2f8e4 100644 (file)
@@ -119,7 +119,6 @@ const DirectoryArrayInputComponent = connect(mapStateToProps)(
             this.setState({ open: true });
         }
 
-
         closeDialog = () => {
             this.setState({ open: false });
         }
@@ -214,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} />
@@ -223,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