Properly debounce searching and make sure to only show results matching the current query.
This commit is contained in:
parent
48f3e9af1d
commit
5ae2975134
5 changed files with 70 additions and 3 deletions
|
@ -47,7 +47,6 @@ angular.module('quay').directive('headerBar', function () {
|
|||
// Monitor any user changes and place the current user into the scope.
|
||||
UserService.updateUserIn($scope);
|
||||
|
||||
|
||||
$scope.currentPageContext = {};
|
||||
|
||||
$rootScope.$watch('currentPage.scope.viewuser', function(u) {
|
||||
|
@ -74,7 +73,7 @@ angular.module('quay').directive('headerBar', function () {
|
|||
};
|
||||
|
||||
ApiService.conductSearch(null, params).then(function(resp) {
|
||||
if (!$scope.searchVisible) { return; }
|
||||
if (!$scope.searchVisible || query != $scope.currentSearchQuery) { return; }
|
||||
|
||||
$scope.searchResultState = {
|
||||
'state': resp.results.length ? 'results' : 'no-results',
|
||||
|
|
Reference in a new issue