Merge "Pagination error in active/merged/invalid stories in projects resolved."

This commit is contained in:
Zuul 2019-03-14 15:44:50 +00:00 committed by Gerrit Code Review
commit 38423acddd
1 changed files with 7 additions and 1 deletions

View File

@ -35,14 +35,20 @@ angular.module('sb.projects').controller('ProjectStoryListController',
$scope.isSearching = false;
$scope.filter = 'active';
$scope.offsets = {
'active': 0,
'merged': 0,
'invalid': 0
};
/**
* Set the filter and refresh the search.
*/
$scope.setFilter = function (state) {
$scope.offsets[$scope.filter] = $scope.searchOffset;
$scope.filter = state;
$scope.searchOffset = $scope.offsets[$scope.filter];
$scope.search();
};
/**
* The search method.
*/