Instead of notifying the grid on all holds, just notify when we're inside
the current page of results.
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Bill Erickson <berickxx@gmail.com>
if ($scope.holds_display == 'alt')
method = 'open-ils.circ.holds.canceled.id_list.retrieve.authoritative';
+ var current = 0;
egCore.net.request(
'open-ils.circ', method,
egCore.auth.token(), $scope.patron_id
patronSvc.hold_ids = hold_ids;
fetchHolds(offset, count)
- .then(deferred.resolve, null, deferred.notify);
+ .then(deferred.resolve, null, function (data) {
+ if (data) {
+ if (current >= offset && current < count) {
+ deferred.notify(data);
+ }
+ current++;
+ }
+ });
});
return deferred.promise;