Skip to content

Commit

Permalink
Show table overflow only if limit exceeded by 2+
Browse files Browse the repository at this point in the history
Having to toggle a +1 feels weird while that +1 takes up
the same vertical space as displaying that row.
  • Loading branch information
rndstr committed Jul 5, 2017
1 parent 57bc34f commit 7a69f80
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,8 @@ class NodeDetailsTable extends React.Component {
}
}

const limited = nodes && this.state.limit > 0 && nodes.length > this.state.limit;
// We do not show "+1" since that space can be used to display another row.
const limited = nodes && this.state.limit > 0 && nodes.length > this.state.limit + 1;
const expanded = this.state.limit === 0;
const notShown = nodes.length - this.state.limit;
if (nodes && limited) {
Expand Down

0 comments on commit 7a69f80

Please sign in to comment.