Skip to content

Commit

Permalink
only show pagination row when table rows are at limit OR when in pagi…
Browse files Browse the repository at this point in the history
…nated result already
  • Loading branch information
dannyvankooten committed Nov 20, 2018
1 parent 019b7c9 commit 072addd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion assets/src/js/components/Table.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ class Table extends Component {
)}) : <div class="table-row"><div class="cell main-col">Nothing here, yet.</div></div>;

// pagination row: only show when total # of results doesn't fit in one table page
const pagination = state.total > state.limit ? (
const pagination = tableRows.length == state.limit || state.offset >= state.limit ? (
<div class="row pag">
<a href="javascript:void(0)" onClick={this.paginatePrev} class="back"></a>
<a href="javascript:void(0)" onClick={this.paginateNext} class="next right"></a>
Expand Down

0 comments on commit 072addd

Please sign in to comment.