diff options
author | Bob Zeleznik <zzzman@gmail.com> | 2019-05-12 09:12:50 -0400 |
---|---|---|
committer | Bob Zeleznik <zzzman@gmail.com> | 2019-05-12 09:12:50 -0400 |
commit | 0e457c6f8268c70408d3740984f3976437535f51 (patch) | |
tree | 2561c591e09b575482f944db966034263bfa8fd2 /src/client/views/EditableView.tsx | |
parent | a225d9f4ee0d44e8cb14f30f27571ec0e846e1e1 (diff) |
adjustments to treeview and ctrl-q pasting.
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 73467eb9d..78143ccda 100644 --- a/src/client/views/EditableView.tsx +++ b/src/client/views/EditableView.tsx @@ -24,6 +24,7 @@ export interface EditableProps { contents: any; height: number; display?: string; + oneLine?: boolean; } /** @@ -54,11 +55,11 @@ export class EditableView extends React.Component<EditableProps> { render() { if (this.editing) { - return <input defaultValue={this.props.GetValue()} onKeyDown={this.onKeyDown} autoFocus onBlur={action(() => this.editing = false)} - style={{ display: this.props.display }}></input>; + return <input className="editableView-input" defaultValue={this.props.GetValue()} onKeyDown={this.onKeyDown} autoFocus onBlur={action(() => this.editing = false)} + style={{ display: this.props.display }} />; } else { return ( - <div className="editableView-container-editing" style={{ display: this.props.display, height: "auto", maxHeight: `${this.props.height}` }} + <div className={`editableView-container-editing${this.props.oneLine ? "-oneLine" : ""}`} style={{ display: this.props.display, height: "auto", maxHeight: `${this.props.height}` }} onClick={action(() => this.editing = true)} > <span>{this.props.contents}</span> </div> |