Merge branch '14129-inputs-modal-new'
[arvados-workbench2.git] / src / components / chips-input / chips-input.tsx
index 12932c54f5775c3d55fe1653171b32fbf7dfb325..13699660053824a8f205efc1f8a556ba43d8b106 100644 (file)
@@ -15,6 +15,9 @@ interface ChipsInputProps<Value> {
     createNewValue: (value: string) => Value;
     inputComponent?: React.ComponentType<InputProps>;
     inputProps?: InputProps;
+    deletable?: boolean;
+    orderable?: boolean;
+    disabled?: boolean;
 }
 
 type CssRules = 'chips' | 'input' | 'inputContainer';
@@ -104,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} />}
                 />
@@ -116,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),