aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/EditableView.tsx
diff options
context:
space:
mode:
authorsrichman333 <sarah_n_richman@brown.edu>2023-07-19 13:39:22 -0400
committersrichman333 <sarah_n_richman@brown.edu>2023-07-19 13:39:22 -0400
commit984db272dc37fc827291010796f300e8745eddf2 (patch)
tree8ec56aa04f32a3edd0a2a8413a3d4b09dac7769b /src/client/views/EditableView.tsx
parentb24babcd89d51e7f6461c57ac16701630c86cf87 (diff)
parentd7a3e39e901054d0308df158cfa578a94f80c467 (diff)
Merge branch 'master' into collaboration-again
Diffstat (limited to 'src/client/views/EditableView.tsx')
-rw-r--r--src/client/views/EditableView.tsx37
1 files changed, 19 insertions, 18 deletions
diff --git a/src/client/views/EditableView.tsx b/src/client/views/EditableView.tsx
index 7043edcee..4a986cb54 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,23 @@ 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() {