auto-select the first result in the search

This commit is contained in:
Joseph Schorr 2015-04-08 15:42:19 -04:00
parent 6173868360
commit b1cf180ab0

View file

@ -79,7 +79,7 @@ angular.module('quay').directive('headerBar', function () {
$scope.searchResultState = { $scope.searchResultState = {
'state': resp.results.length ? 'results' : 'no-results', 'state': resp.results.length ? 'results' : 'no-results',
'results': resp.results, 'results': resp.results,
'current': -1 'current': resp.results.length ? 0 : -1
}; };
}, function(resp) { }, function(resp) {
$scope.searchResultState = null; $scope.searchResultState = null;