//
// SPDX-License-Identifier: AGPL-3.0
-import * as React from 'react';
+import React from 'react';
import {
Input as MuiInput,
Chip as MuiChip,
label?: string;
value: string;
items: Item[];
+ disabled?: boolean;
suggestions?: Suggestion[];
error?: boolean;
helperText?: string;
renderInput() {
return <Input
+ disabled={this.props.disabled}
autoFocus={this.props.autofocus}
inputRef={this.inputRef}
value={this.props.value}
<Chip
label={this.renderChipValue(item)}
key={index}
- onDelete={() => onDelete ? onDelete(item, index) : undefined} />
+ onDelete={onDelete && !this.props.disabled ? (() => onDelete(item, index)) : undefined} />
);
}