Skip to content

Commit

Permalink
#1410 Update the PaginatedQuerySrv to conditionally list count refetch
Browse files Browse the repository at this point in the history
  • Loading branch information
nadouani committed Jul 24, 2020
1 parent 3ed733c commit c55e1ce
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
objectType: self.streamObjectType,
callback: function(updates) {
if(!self.guard || self.guard(updates)) {
self.update(updates);
self.update(updates, true);
}
}
};
Expand Down Expand Up @@ -124,7 +124,7 @@
/*
Function to change the page
*/
this.update = function(updates) {
this.update = function(updates, forceCount) {
var filters = self.getFilter();

// Get the list
Expand Down Expand Up @@ -156,7 +156,7 @@

// get the total if not cached
var hash = $filter('md5')(JSON.stringify(this.filter));
if(!!!this.loadAll && this.filterHash !== hash) {
if(forceCount || (!!!this.loadAll && this.filterHash !== hash)) {
this.filterHash = hash;

// Compute the total again
Expand Down

0 comments on commit c55e1ce

Please sign in to comment.