Skip to content

Commit

Permalink
Fix the table sorting order bug for numerical values (#2587)
Browse files Browse the repository at this point in the history
* Fix the table sorting order bug for numerical values.

* Addressed @davkal's comment.
  • Loading branch information
fbarl authored Jun 19, 2017
1 parent e42347a commit fd8f9be
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,8 @@ export default class NodeDetailsTable extends React.Component {

const sortedBy = this.state.sortedBy || getDefaultSortedBy(columns, this.props.nodes);
const sortedByHeader = this.getColumnHeaders().find(h => h.id === sortedBy);
const sortedDesc = this.state.sortedDesc || defaultSortDesc(sortedByHeader);
const sortedDesc = (this.state.sortedDesc === null) ?
defaultSortDesc(sortedByHeader) : this.state.sortedDesc;

let nodes = getSortedNodes(this.props.nodes, sortedByHeader, sortedDesc);

Expand Down

0 comments on commit fd8f9be

Please sign in to comment.