Skip to content
This repository has been archived by the owner on Jan 6, 2023. It is now read-only.

Commit

Permalink
fit: for UiPager, show that there is one page when showing all
Browse files Browse the repository at this point in the history
  • Loading branch information
mdeanjones committed Dec 21, 2022
1 parent ec502bb commit 678113d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion addon/components/ui-pager/component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,9 @@ export default class UiPager extends Component {
*/
@computed('recordCount', 'intPageSize')
protected get pageCount() {
return Math.ceil(this.recordCount / this.intPageSize);
return Math.ceil(
this.recordCount / (this.intPageSize === -1 ? this.recordCount : this.intPageSize)
);
}

/**
Expand Down

0 comments on commit 678113d

Please sign in to comment.