aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/EditableView.tsx
diff options
context:
space:
mode:
authorNathan-SR <144961007+Nathan-SR@users.noreply.github.com>2024-10-09 16:58:33 -0400
committerNathan-SR <144961007+Nathan-SR@users.noreply.github.com>2024-10-09 16:58:33 -0400
commit6ae5bd63d5355a03dba099a149532e7c6b1fd74a (patch)
tree5971f41919806c4055aab9f6e8d3284a7098cd14 /src/client/views/EditableView.tsx
parentb21d8cc9d1b25ccd2e0103f47ad132dd6f04612d (diff)
small changes for pull request; removed schema type reference in editableview; a couple lint changes
Diffstat (limited to 'src/client/views/EditableView.tsx')
-rw-r--r--src/client/views/EditableView.tsx7
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