From c55e1ce0f1f04ca4ae939d17575fa72d355379e6 Mon Sep 17 00:00:00 2001 From: Nabil Adouani Date: Fri, 24 Jul 2020 12:36:53 +0200 Subject: [PATCH] #1410 Update the PaginatedQuerySrv to conditionally list count refetch --- .../app/scripts/services/common/data/PaginatedQuerySrv.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/app/scripts/services/common/data/PaginatedQuerySrv.js b/frontend/app/scripts/services/common/data/PaginatedQuerySrv.js index eb596c3854..e15ec0e52b 100644 --- a/frontend/app/scripts/services/common/data/PaginatedQuerySrv.js +++ b/frontend/app/scripts/services/common/data/PaginatedQuerySrv.js @@ -44,7 +44,7 @@ objectType: self.streamObjectType, callback: function(updates) { if(!self.guard || self.guard(updates)) { - self.update(updates); + self.update(updates, true); } } }; @@ -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 @@ -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