aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/views/nodes')
-rw-r--r--src/client/views/nodes/formattedText/DashFieldView.scss3
-rw-r--r--src/client/views/nodes/formattedText/DashFieldView.tsx5
2 files changed, 6 insertions, 2 deletions
diff --git a/src/client/views/nodes/formattedText/DashFieldView.scss b/src/client/views/nodes/formattedText/DashFieldView.scss
index 2e2e1d41c..6db8abc7f 100644
--- a/src/client/views/nodes/formattedText/DashFieldView.scss
+++ b/src/client/views/nodes/formattedText/DashFieldView.scss
@@ -42,6 +42,9 @@
user-select: all;
min-width: 100%;
display: inline-block;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ max-width: 100%;
}
}
}
diff --git a/src/client/views/nodes/formattedText/DashFieldView.tsx b/src/client/views/nodes/formattedText/DashFieldView.tsx
index bb0efa917..7ea5d1fcf 100644
--- a/src/client/views/nodes/formattedText/DashFieldView.tsx
+++ b/src/client/views/nodes/formattedText/DashFieldView.tsx
@@ -184,7 +184,7 @@ export class DashFieldViewInternal extends ObservableReactComponent<IDashFieldVi
getFinfo={this.finfo}
setColumnValues={returnFalse}
allowCRs
- oneLine={!this._expanded}
+ oneLine={!this._expanded && this._props.editable}
finishEdit={this.finishEdit}
transform={Transform.Identity}
menuTarget={null}
@@ -275,7 +275,7 @@ export class DashFieldViewInternal extends ObservableReactComponent<IDashFieldVi
</span>
)}
{this._props.fieldKey.startsWith('#') || this._hideValue ? null : this.fieldValueContent}
- {!this.values.length ? null : (
+ {!this.values.length || !this.props.editable ? null : (
<select className="dashFieldView-select" tabIndex={-1} defaultValue={this._dashDoc && Field.toKeyValueString(this._dashDoc, this._fieldKey)} onChange={this.selectVal}>
<option value="-unset-">-unset-</option>
{this.values.map(val => (
@@ -308,6 +308,7 @@ export class DashFieldView {
this.dom.style.height = node.attrs.height;
this.dom.style.position = 'relative';
this.dom.style.display = 'inline-flex';
+ this.dom.style.maxWidth = '100%';
this.dom.onkeypress = function (e: KeyboardEvent) {
e.stopPropagation();
};