diff options
author | laurawilsonri <laura_wilson@brown.edu> | 2019-03-18 18:14:27 -0400 |
---|---|---|
committer | laurawilsonri <laura_wilson@brown.edu> | 2019-03-18 18:14:27 -0400 |
commit | 9d939c1190ef86e456cf26e9f5cb84743279f7a6 (patch) | |
tree | 24d72d918f2becf6762ea30b92da7339957eedbd /src/client/views/EditableView.tsx | |
parent | 67170e521366f8178645cc85aaf377e53b1a6f21 (diff) | |
parent | f70ad315167b714f11f7d68f35a46abe9e525a4d (diff) |
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web into editableSchema
Diffstat (limited to 'src/client/views/EditableView.tsx')
-rw-r--r-- | src/client/views/EditableView.tsx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/client/views/EditableView.tsx b/src/client/views/EditableView.tsx index 84b1b91c3..98a6ed1ba 100644 --- a/src/client/views/EditableView.tsx +++ b/src/client/views/EditableView.tsx @@ -1,6 +1,7 @@ import React = require('react') import { observer } from 'mobx-react'; import { observable, action } from 'mobx'; +import "./EditableView.scss" export interface EditableProps { /** @@ -20,6 +21,7 @@ export interface EditableProps { */ contents: any; height: number + display?: string; } /** @@ -46,10 +48,10 @@ 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: "inline" }}></input> + style={{ display: this.props.display }}></input> } else { return ( - <div className="editableView-container-editing" style={{ display: "inline", height: "100%", maxHeight: `${this.props.height}` }} + <div className="editableView-container-editing" style={{ display: this.props.display, height: "auto", maxHeight: `${this.props.height}` }} onClick={action(() => this.editing = true)}> {this.props.contents} </div> |