Merge branch 'master' into 14604-ui-improvements
[arvados-workbench2.git] / src / views / run-process-panel / inputs / directory-array-input.tsx
index d4f4cb6d3767e536d53dd180e059eaa972042741..a7d83daef57f82b9cbbd8bf5f70ca1088ae78f9e 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
@@ -279,7 +280,7 @@ const DirectoryArrayInputComponent = connect(mapStateToProps)(
                     </div>
                     <Divider />
                     <div className={classes.chips}>
-                        <Typography variant='subheading'>Selected collections ({this.state.directories.length}):</Typography>
+                        <Typography variant='subtitle1'>Selected collections ({this.state.directories.length}):</Typography>
                         <Chips
                             orderable
                             deletable