Skip to content

Commit

Permalink
fix: resolve range start and end
Browse files Browse the repository at this point in the history
Signed-off-by: Akshat Patel <[email protected]>
  • Loading branch information
Akshat55 committed Nov 29, 2024
1 parent e0d8c64 commit 3574699
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export class PaginationOverflow {
@Output() change = new EventEmitter<number>();

get countAsArray() {
const rangeArray = range((this.count >= 0 ? this.count : 0), 1);
const rangeArray = range((this.count >= 0 ? this.count + 1 : 0), 1);
return rangeArray;
}

Expand Down
6 changes: 3 additions & 3 deletions src/pagination/pagination.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ export class Pagination {
*/
@Input() model: PaginationModel;
/**
* Set to `true` to disable the backward/forward buttons.
* Set to `true` to disable the backward/forward buttons.
*/
@Input() disabled = false;
/**
Expand Down Expand Up @@ -261,7 +261,7 @@ export class Pagination {
* ```
*/
@Input()
set translations (value: PaginationTranslations) {
set translations(value: PaginationTranslations) {
const valueWithDefaults = merge(this.i18n.getMultiple("PAGINATION"), value);
this.itemsPerPageText.override(valueWithDefaults.ITEMS_PER_PAGE);
this.optionsListText.override(valueWithDefaults.OPEN_LIST_OF_OPTIONS);
Expand Down Expand Up @@ -352,7 +352,7 @@ export class Pagination {
*/
const numberOfPages = Math.max(Math.ceil(this.totalDataLength / this.itemsPerPage), 1);
if (this._pageOptions.length !== numberOfPages) {
this._pageOptions = range(numberOfPages, 1);
this._pageOptions = range(numberOfPages + 1, 1);
}
return this._pageOptions;
}
Expand Down

0 comments on commit 3574699

Please sign in to comment.