aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/EditableView.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/views/EditableView.tsx')
-rw-r--r--src/client/views/EditableView.tsx21
1 files changed, 10 insertions, 11 deletions
diff --git a/src/client/views/EditableView.tsx b/src/client/views/EditableView.tsx
index 41079045b..898a98c98 100644
--- a/src/client/views/EditableView.tsx
+++ b/src/client/views/EditableView.tsx
@@ -53,7 +53,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;
@@ -288,16 +289,14 @@ 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) {
- toDisplay = (
- <input
- className="editableView-input"
- value={gval}
- placeholder="Add key"
- readOnly
- style={{ display: this._props.display, overflow: 'auto', pointerEvents: 'none', fontSize: this._props.fontSize, width: '100%', margin: 0, background: this._props.background }}
- />
- );
+ if (this._props.inputString){
+ toDisplay = <input className="editableView-input"
+ value={gval}
+ 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
+ />
} else {
toDisplay = (
<span