Skip to content

Commit

Permalink
Merge pull request #436 from UiPath/fix/selectable-index-page-size
Browse files Browse the repository at this point in the history
fix(grid): selectable index react to page size
  • Loading branch information
CalinaCristian authored Dec 5, 2023
2 parents 8232fcb + 2378b6f commit a12230e
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 8 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# v15.0.11 (2023-12-05)
* **grid** selectable index react to pageSize
* **file-picker** make input optional in file-drop-zone

# v15.0.10 (2023-12-04)
* **grid** add selectable page index
* **fix** increase loading buffer size
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "angular-components",
"version": "15.0.10",
"version": "15.0.11",
"author": {
"name": "UiPath Inc",
"url": "https://uipath.com"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,19 @@ export class UiGridCustomPaginatorComponent extends _MatPaginatorBase<MatPaginat
return Math.min(this.length, (this.pageIndex + 1) * this.pageSize);
}

set pageSize(value: number) {
super.pageSize = value;

this._generatePossiblePages();
}
get pageSize(): number {
return super.pageSize;
}

set length(value: number) {
super.length = value;

this.possiblePages = Array.from({ length: this.pageCount }, (_, i) => ({
label: i + 1,
value: i,
}));
this._generatePossiblePages();
}
get length() {
return super.length;
Expand Down Expand Up @@ -115,4 +121,11 @@ export class UiGridCustomPaginatorComponent extends _MatPaginatorBase<MatPaginat
length: this.length,
});
}

private _generatePossiblePages() {
this.possiblePages = Array.from({ length: this.pageCount }, (_, i) => ({
label: i + 1,
value: i,
}));
}
}
2 changes: 1 addition & 1 deletion projects/angular/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@uipath/angular",
"version": "15.0.10",
"version": "15.0.11",
"license": "MIT",
"author": {
"name": "UiPath Inc",
Expand Down

0 comments on commit a12230e

Please sign in to comment.