aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/KeyValuePair.tsx
diff options
context:
space:
mode:
authoryipstanley <stanley_yip@brown.edu>2019-06-24 15:59:22 -0400
committeryipstanley <stanley_yip@brown.edu>2019-06-24 15:59:22 -0400
commita99639e9073ea154728ff9676c41af646791f4cd (patch)
tree027ef2ae68f00432c99cf1caf6ad4d9c9547b5d8 /src/client/views/nodes/KeyValuePair.tsx
parent65288e33b49404d21012323fcb53fefb3f646fbf (diff)
parentd475b19e9ba7bc8870ec7bc1e10b5cc88decea0b (diff)
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web into pdf_snippet
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 "";
}}