aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/KeyValuePair.tsx
diff options
context:
space:
mode:
authorFawn <fangrui_tong@brown.edu>2019-06-25 18:23:26 -0400
committerFawn <fangrui_tong@brown.edu>2019-06-25 18:23:26 -0400
commit7abe170ce5bd0c415e23456eb2bed26e8fdee7aa (patch)
treecc7bdf2859274b78fb8a803f746ec873b5c14a58 /src/client/views/nodes/KeyValuePair.tsx
parent41cf1e8536964764f18ab752140e484e36cbe464 (diff)
parent219cabb3fe42ab199550efc3423b7aaed4e1ee93 (diff)
merge
Diffstat (limited to 'src/client/views/nodes/KeyValuePair.tsx')
-rw-r--r--src/client/views/nodes/KeyValuePair.tsx4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/views/nodes/KeyValuePair.tsx b/src/client/views/nodes/KeyValuePair.tsx
index dd1bca7f6..da0aa6ac4 100644
--- a/src/client/views/nodes/KeyValuePair.tsx
+++ b/src/client/views/nodes/KeyValuePair.tsx
@@ -11,7 +11,6 @@ import "./KeyValuePair.scss";
import React = require("react");
import { Doc, Opt, Field } from '../../../new_fields/Doc';
import { FieldValue } from '../../../new_fields/Types';
-import { ComputedField } from '../../../fields/ScriptField';
import { KeyValueBox } from './KeyValueBox';
// Represents one row in a key value plane
@@ -61,10 +60,11 @@ export class KeyValuePair extends React.Component<KeyValuePairProps> {
</td>
<td className="keyValuePair-td-value" style={{ width: `${100 - this.props.keyWidth}%` }}>
<EditableView contents={contents} height={36} GetValue={() => {
+ const onDelegate = Object.keys(props.Document).includes(props.fieldKey);
let field = FieldValue(props.Document[props.fieldKey]);
if (Field.IsField(field)) {
- return Field.toScriptString(field);
+ return (onDelegate ? "=" : "") + Field.toScriptString(field);
}
return "";
}}