Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion src/dashboard/Data/Views/ViewValueDialog.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,18 @@ export default function ViewValueDialog({ value, onClose }) {
showCancel={false}
onConfirm={onClose}
>
<Field label={<Label text="Value" />} input={<TextInput value={stringValue} multiline monospace disabled />} />
<Field
label={<Label text="Value" />}
input={
<TextInput
value={stringValue}
multiline
monospace
disabled
onChange={() => {}}
/>
}
/>
</Modal>
);
}
23 changes: 17 additions & 6 deletions src/dashboard/Data/Views/Views.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,8 @@ class Views extends TableView {
}
}
let content = '';
if (type === 'Pointer' && value && value.className && value.objectId) {
const hasPill = type === 'Pointer' && value && value.className && value.objectId;
if (hasPill) {
const id = value.objectId;
const className = value.className;
content = (
Expand All @@ -301,14 +302,24 @@ class Views extends TableView {
content = String(value);
}
const isViewable = ['String', 'Number', 'Object'].includes(type);
const cellProps = {};
const classes = [styles.cell];
if (hasPill) {
classes.push(styles.pillCell);
}
let cellContent = content;
if (isViewable) {
cellProps.onClick = () => this.handleValueClick(value);
cellProps.style = { cursor: 'pointer' };
cellContent = (
<span
className={styles.clickableText}
onClick={() => this.handleValueClick(value)}
>
{content}
</span>
);
}
return (
<td key={name} className={styles.cell} {...cellProps}>
{content}
<td key={name} className={classes.join(' ')}>
{cellContent}
</td>
);
})}
Expand Down
8 changes: 8 additions & 0 deletions src/dashboard/Data/Views/Views.scss
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,11 @@
max-width: none;
}

.tableRow td.pillCell {
line-height: 8px;
}

.clickableText {
cursor: pointer;
}

Loading