Skip to content

Commit

Permalink
Fix page size in function list (#97)
Browse files Browse the repository at this point in the history
`slice()` doesn't include the end element in the array that returns, so
we were rendering 9 functions instead of 10.
  • Loading branch information
edmundoa authored and bernd committed Aug 30, 2016
1 parent c974837 commit 71f5b31
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/web/rules/RuleHelper.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ end`,
return <Spinner />;
}

const pagedEntries = this.state.functionDescriptors.slice((this.state.currentPage - 1) * this.state.pageSize, (this.state.currentPage * this.state.pageSize) - 1);
const pagedEntries = this.state.functionDescriptors.slice((this.state.currentPage - 1) * this.state.pageSize, this.state.currentPage * this.state.pageSize);

return (
<Panel header="Rules quick reference">
Expand Down

0 comments on commit 71f5b31

Please sign in to comment.