Merge branch 'master' into 14431-metadata
[arvados-workbench2.git] / src / components / chips-input / chips-input.tsx
index fc5fda01be0e7366c9de395b9c38a0b9bafe459d..13699660053824a8f205efc1f8a556ba43d8b106 100644 (file)
@@ -17,6 +17,7 @@ interface ChipsInputProps<Value> {
     inputProps?: InputProps;
     deletable?: boolean;
     orderable?: boolean;
+    disabled?: boolean;
 }
 
 type CssRules = 'chips' | 'input' | 'inputContainer';
@@ -106,6 +107,7 @@ export const ChipsInput = withStyles(styles)(
             return <div className={classes.chips}>
                 <Chips
                     {...props}
+                    clickable={!props.disabled}
                     values={value}
                     filler={<div ref={this.filler} />}
                 />
@@ -118,6 +120,7 @@ export const ChipsInput = withStyles(styles)(
                 {...InputProps}
                 value={this.state.text}
                 onChange={this.setText}
+                disabled={this.props.disabled}
                 onKeyDown={this.handleKeyPress}
                 inputProps={{
                     ...(InputProps && InputProps.inputProps),