Add label_minor to tooltips in connections table

Sometimes label is not enough to distinguish between rows.
This commit is contained in:
Simon Howe
2016-10-10 15:15:31 +02:00
parent 2bc31e8728
commit bec4d281c3
3 changed files with 35 additions and 26 deletions

View File

@@ -18,17 +18,20 @@ class NodeDetailsTableNodeLink extends React.Component {
}
render() {
if (this.props.linkable) {
const { label, label_minor: labelMinor, linkable } = this.props;
const title = !labelMinor ? label : `${label} (${labelMinor})`;
if (linkable) {
return (
<span className="node-details-table-node-link" title={this.props.label}
<span className="node-details-table-node-link" title={title}
onClick={this.handleClick}>
{this.props.label}
{label}
</span>
);
}
return (
<span className="node-details-table-node" title={this.props.label}>
{this.props.label}
<span className="node-details-table-node" title={title}>
{label}
</span>
);
}