Skip to content

Commit f874025

Browse files
authored
Merge pull request #231 from UiPath/fix/grid_reset_page
Fix/grid reset page
2 parents 17d67e9 + 8e69c08 commit f874025

File tree

6 files changed

+13
-7
lines changed

6 files changed

+13
-7
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# v13.3.2 (2022-05-12)
2+
* **grid** set first page when page index exists
3+
14
# v13.3.1 (2022-05-11)
25
* **grid** set proper import path
36

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular-components",
3-
"version": "13.3.1",
3+
"version": "13.3.2",
44
"author": {
55
"name": "UiPath Inc",
66
"url": "https://uipath.com"

projects/angular/components/ui-grid/src/managers/filter-manager.spec.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ describe('Component: UiGrid', () => {
145145

146146
it('should set page index to 0', (done) => {
147147
const footer = new UiGridFooterDirective();
148+
footer.state.pageIndex = 2;
148149
footer.pageChange
149150
.pipe(
150151
first(),

projects/angular/components/ui-grid/src/managers/filter-manager.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,12 @@ export class FilterManager<T> {
9696
header.searchValue = term;
9797
header.searchTerm.emit(term);
9898
header.searchFilter.emit(searchFilterCollection);
99-
footer?.pageChange.emit({
100-
pageIndex: 0,
101-
pageSize: footer.state.pageSize,
102-
});
99+
if (footer?.state.pageIndex) {
100+
footer.pageChange.emit({
101+
pageIndex: 0,
102+
pageSize: footer.state.pageSize,
103+
});
104+
}
103105
}
104106

105107
private _updateFilterValue = (

projects/angular/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@uipath/angular",
3-
"version": "13.3.1",
3+
"version": "13.3.2",
44
"license": "MIT",
55
"author": {
66
"name": "UiPath Inc",

0 commit comments

Comments
 (0)