diff --git a/client/core/src/components/auto-paging/auto-paging.js b/client/core/src/components/auto-paging/auto-paging.js index f8b07f2adf..3278e68691 100644 --- a/client/core/src/components/auto-paging/auto-paging.js +++ b/client/core/src/components/auto-paging/auto-paging.js @@ -2,13 +2,14 @@ import ngModule from '../../module'; import getWatchers from '../../lib/get-watchers'; class AutoPaging { - constructor($http, $window, $element, $timeout, vnApp, $translate) { + constructor($http, $window, $element, $timeout, vnApp, $translate, $scope) { this.$http = $http; this.$window = $window; this.$element = $element; this.$timeout = $timeout; this.vnApp = vnApp; this.$translate = $translate; + this.$scope = $scope; this.numPerPage = null; this.maxItems = 0; @@ -31,6 +32,7 @@ class AutoPaging { res.instances.forEach(item => { this.items.push(item); }); + this.$scope.$apply(); this.checkWatchers(); }); if (this.index.filter.page == this.numPages) { @@ -108,7 +110,7 @@ class AutoPaging { } } -AutoPaging.$inject = ['$http', '$window', '$element', '$timeout', 'vnApp', '$translate']; +AutoPaging.$inject = ['$http', '$window', '$element', '$timeout', 'vnApp', '$translate', '$scope']; ngModule.component('vnAutoPaging', { template: require('./auto-paging.html'),