aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/EditableView.tsx
diff options
context:
space:
mode:
authormonoguitari <113245090+monoguitari@users.noreply.github.com>2023-08-22 14:15:04 -0400
committermonoguitari <113245090+monoguitari@users.noreply.github.com>2023-08-22 14:15:04 -0400
commit9293fd8c4128b41b31f9b2214d6799fdff0f2aaa (patch)
tree45809c42545b10515f6f88065318b454549dacd1 /src/client/views/EditableView.tsx
parent347e8e2bd32854b36828b7bcc645c9c361204251 (diff)
parent1c52bd054385d2584bbeae41eecdf9ba6999c25f (diff)
Merge branch 'master' into advanced-trails
Diffstat (limited to 'src/client/views/EditableView.tsx')
-rw-r--r--src/client/views/EditableView.tsx36
1 files changed, 19 insertions, 17 deletions
diff --git a/src/client/views/EditableView.tsx b/src/client/views/EditableView.tsx
index 7043edcee..d60617020 100644
--- a/src/client/views/EditableView.tsx
+++ b/src/client/views/EditableView.tsx
@@ -6,6 +6,7 @@ import { ObjectField } from '../../fields/ObjectField';
import './EditableView.scss';
import { DocumentIconContainer } from './nodes/DocumentIcon';
import { OverlayView } from './OverlayView';
+import { EditableText } from 'browndash-components';
export interface EditableProps {
/**
@@ -231,7 +232,7 @@ export class EditableView extends React.Component<EditableProps> {
onChange: this.props.autosuggestProps.onChange,
}}
/>
- ) : this.props.oneLine !== false && this.props.GetValue()?.toString().indexOf('\n') === -1 ? (
+ ) : (
<input
className="editableView-input"
ref={r => (this._inputref = r)}
@@ -247,23 +248,24 @@ export class EditableView extends React.Component<EditableProps> {
onClick={this.stopPropagation}
onPointerUp={this.stopPropagation}
/>
- ) : (
- <textarea
- className="editableView-input"
- ref={r => (this._inputref = r)}
- style={{ display: this.props.display, overflow: 'auto', fontSize: this.props.fontSize, minHeight: `min(100%, ${(this.props.GetValue()?.split('\n').length || 1) * 15})`, minWidth: 20, background: this.props.background }}
- placeholder={this.props.placeholder}
- onBlur={e => this.finalizeEdit(e.currentTarget.value, false, true, false)}
- defaultValue={this.props.GetValue()}
- autoFocus={true}
- onChange={this.onChange}
- onKeyDown={this.onKeyDown}
- onKeyPress={this.stopPropagation}
- onPointerDown={this.stopPropagation}
- onClick={this.stopPropagation}
- onPointerUp={this.stopPropagation}
- />
);
+ // ) : (
+ // <textarea
+ // className="editableView-input"
+ // ref={r => (this._inputref = r)}
+ // style={{ display: this.props.display, overflow: 'auto', fontSize: this.props.fontSize, minHeight: `min(100%, ${(this.props.GetValue()?.split('\n').length || 1) * 15})`, minWidth: 20, background: this.props.background }}
+ // placeholder={this.props.placeholder}
+ // onBlur={e => this.finalizeEdit(e.currentTarget.value, false, true, false)}
+ // defaultValue={this.props.GetValue()}
+ // autoFocus={true}
+ // onChange={this.onChange}
+ // onKeyDown={this.onKeyDown}
+ // onKeyPress={this.stopPropagation}
+ // onPointerDown={this.stopPropagation}
+ // onClick={this.stopPropagation}
+ // onPointerUp={this.stopPropagation}
+ // />
+ // );
}
render() {