diff options
Diffstat (limited to 'src/client/views/EditableView.tsx')
-rw-r--r-- | src/client/views/EditableView.tsx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/client/views/EditableView.tsx b/src/client/views/EditableView.tsx index 9722b2d4b..9974fc63b 100644 --- a/src/client/views/EditableView.tsx +++ b/src/client/views/EditableView.tsx @@ -54,7 +54,8 @@ export interface EditableProps { placeholder?: string; wrap?: string; // nowrap, pre-wrap, etc - schemaFieldType?: SchemaFieldType; + inputString?: boolean; + inputStringPlaceholder?: string; prohibitedText?: Array<string>; onClick?: () => void; updateAlt?: (newAlt: string) => void; @@ -290,10 +291,10 @@ export class EditableView extends ObservableReactComponent<EditableProps> { staticDisplay = () => { let toDisplay; const gval = this._props.GetValue()?.replace(/\n/g, '\\r\\n'); - if (this._props.schemaFieldType === SchemaFieldType.Header){ + if (this._props.inputString){ toDisplay = <input className="editableView-input" value={gval} - placeholder='Add key' + placeholder={this._props.inputStringPlaceholder} readOnly style={{ display: this._props.display, overflow: 'auto', pointerEvents: 'none', fontSize: this._props.fontSize, width: '100%', margin: 0, background: this._props.background}} // eslint-disable-next-line jsx-a11y/no-autofocus |