Closed LaureMonlouis closed 7 years ago
I found a way !
$scope.$watch('campagne', function (newVal, oldVal) {
$scope.filtered = filterFilter($scope.filtered, {cam: newVal, cib:$scope.cible});
$scope.totalItems = $scope.filtered.length;
$scope.currentPage = 1;
}, true);
I think your issue is with the filter, not pagination. There aren't enough details provided to identify the issue though.
Are your filters 'AND' or 'OR'?
I would try placing each of your filters in its own pipe:
| filter : foo : bar
| filter : boo : far
For science
Hello ! I did not find the answer I need in previous posts so I will ask here.
Question:
I have quite a big table, with severals colums and I use pagination on my table (uib-pagination). I have some criterias on the table, on for each colum we can say. I would like to uptdate pagination after applying different filters on my table.
HTML code :
JS code :
When I use "campagne" filter first for instance, pagination updates well, but when I use "cible" filter after, this ligne
$scope.filtered = filterFilter($scope.objects, newVal);
makes that the pagination updates on all table filtered only by the "cible" filter.I don't know how I can consider all filters at the same time to udpate pagination.
P.S.: $watchGroup does not solve my issue.
Dependencies
Angular : 1.6.4 Angular-ui-bootstrap : 2.5.0