aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/EditableView.tsx
diff options
context:
space:
mode:
authorSam Wilkins <abdullah_ahmed@brown.edu>2019-03-09 23:00:41 -0500
committerSam Wilkins <abdullah_ahmed@brown.edu>2019-03-09 23:00:41 -0500
commit81c0a8373fd5cb051531762243e200f11f8c7297 (patch)
tree5436511d43ec2d77133160ad193155ab1ae4ac8e /src/client/views/EditableView.tsx
parentf9f0fd90791562c295f8d9b237596cbabb086b79 (diff)
editable workspace titles now supported, added 'display' prop to EditableView
Diffstat (limited to 'src/client/views/EditableView.tsx')
-rw-r--r--src/client/views/EditableView.tsx5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/client/views/EditableView.tsx b/src/client/views/EditableView.tsx
index 84b1b91c3..55a49863d 100644
--- a/src/client/views/EditableView.tsx
+++ b/src/client/views/EditableView.tsx
@@ -20,6 +20,7 @@ export interface EditableProps {
*/
contents: any;
height: number
+ display: string;
}
/**
@@ -46,10 +47,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: "100%", maxHeight: `${this.props.height}` }}
onClick={action(() => this.editing = true)}>
{this.props.contents}
</div>