aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/KeyValuePair.tsx
diff options
context:
space:
mode:
authorsrichman333 <sarah_n_richman@brown.edu>2023-08-18 13:24:03 -0400
committersrichman333 <sarah_n_richman@brown.edu>2023-08-18 13:24:03 -0400
commit9ffbc63fe7676f6c09a6651ea20a9e024d0a6646 (patch)
tree3469685f73cb82b0a3f1d3bccf0288c26265259f /src/client/views/nodes/KeyValuePair.tsx
parent98bf66df242476ebb8e1a678e4d1687908259aca (diff)
parent9dfca50488241998fa1a99f660b12f43ad803d38 (diff)
Merge branch 'master' into data-visualization-sarah
Diffstat (limited to 'src/client/views/nodes/KeyValuePair.tsx')
-rw-r--r--src/client/views/nodes/KeyValuePair.tsx14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/client/views/nodes/KeyValuePair.tsx b/src/client/views/nodes/KeyValuePair.tsx
index 01acdccb7..b0d041bdd 100644
--- a/src/client/views/nodes/KeyValuePair.tsx
+++ b/src/client/views/nodes/KeyValuePair.tsx
@@ -14,6 +14,8 @@ import './KeyValueBox.scss';
import './KeyValuePair.scss';
import React = require('react');
import { DocCast } from '../../../fields/Types';
+import { Tooltip } from '@material-ui/core';
+import { DocumentOptions, FInfo } from '../../documents/Documents';
// Represents one row in a key value plane
@@ -109,11 +111,13 @@ export class KeyValuePair extends React.Component<KeyValuePairProps> {
X
</button>
<input className="keyValuePair-td-key-check" type="checkbox" style={hover} onChange={this.handleCheck} ref={this.checkbox} />
- <div className="keyValuePair-keyField" style={{ marginLeft: 20 * (props.fieldKey.match(/_/g)?.length || 0), color: keyStyle }}>
- {'('.repeat(parenCount)}
- {props.fieldKey}
- {')'.repeat(parenCount)}
- </div>
+ <Tooltip title={Object.entries(new DocumentOptions()).find((pair: [string, FInfo]) => pair[0].replace(/^_/, '') === props.fieldKey)?.[1].description}>
+ <div className="keyValuePair-keyField" style={{ marginLeft: 20 * (props.fieldKey.match(/_/g)?.length || 0), color: keyStyle }}>
+ {'('.repeat(parenCount)}
+ {props.fieldKey}
+ {')'.repeat(parenCount)}
+ </div>
+ </Tooltip>
</div>
</td>
<td className="keyValuePair-td-value" style={{ width: `${100 - this.props.keyWidth}%` }} onContextMenu={this.onContextMenu}>