Skip to content

Commit 6bb1fdd

Browse files
committed
- Fix for not resetting the currentPage
- Takes care of this case whenever you are changing pageSize, searching or sorting.
1 parent a2eecad commit 6bb1fdd

File tree

4 files changed

+22
-11
lines changed

4 files changed

+22
-11
lines changed

build/js/ngReactGrid-0.4.0.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@ angular.module("ngReactGrid", [])
7171
$rootScope.$apply(function() {
7272

7373
this.ngReactGrid.update({
74-
pageSize: pageSize
74+
pageSize: pageSize,
75+
currentPage: 1
7576
});
7677

7778
if(!this.grid.localMode) {
@@ -133,7 +134,8 @@ angular.module("ngReactGrid", [])
133134
}.bind(this));
134135

135136
this.ngReactGrid.update({
136-
data: copy
137+
data: copy,
138+
currentPage: 1
137139
}, true);
138140

139141
this.ngReactGrid.render();
@@ -166,7 +168,8 @@ angular.module("ngReactGrid", [])
166168
});
167169

168170
this.ngReactGrid.update({
169-
data: filteredData
171+
data: filteredData,
172+
currentPage: 1
170173
}, false, true);
171174

172175
} else {

0 commit comments

Comments
 (0)