Fix broken RunFeed sort.
@@ -144,7 +144,9 @@ class RunFeedHeader extends React.Component {
height: Math.min(longestColumn.length, maxColNameLength) * 8,
}}>
{selectable && <Table.HeaderCell />}
- {columnNames.map(columnName => (
+ {columnNames.map(columnName => {
+ let columnKey = columnName.split(':')[1];
+ return (
<Table.HeaderCell
key={columnName}
className={
@@ -167,14 +169,13 @@ class RunFeedHeader extends React.Component {
<div>
{_.startsWith(columnName, 'config:') ||
_.startsWith(columnName, 'summary:') ? (
- ((columnName = columnName.split(':')[1]),
- columnName.length > maxColNameLength ? (
+ columnKey.length > maxColNameLength ? (
<span key={columnName}>
- {truncateString(columnName, maxColNameLength)}
+ {truncateString(columnKey, maxColNameLength)}
</span>
) : (
- <span>{columnName}</span>
- ))
+ <span>{columnKey}</span>
+ )
) : (
<span>{columnName}</span>
)}
@@ -187,7 +188,8 @@ class RunFeedHeader extends React.Component {
))}
</div>
</Table.HeaderCell>
- ))}
+ );
+ })}
</Table.Row>
</Table.Header>
);
@@ -437,6 +439,7 @@ class RunFeed extends PureComponent {
<RunFeedHeader
selectable={this.props.selectable}
sort={this.props.sort}
+ setSort={this.props.setSort}
columnNames={columnNames}
/>
<Table.Body>
