KEYCLOAK-3633: Don't search on initial page load.
This commit is contained in:
parent
ab8803a5d6
commit
9b10110dcb
2 changed files with 3 additions and 1 deletions
|
@ -248,7 +248,7 @@ module.controller('UserListCtrl', function($scope, realm, User, UserSearchState,
|
||||||
UserSearchState.query.realm = realm.realm;
|
UserSearchState.query.realm = realm.realm;
|
||||||
$scope.query = UserSearchState.query;
|
$scope.query = UserSearchState.query;
|
||||||
|
|
||||||
$scope.searchQuery();
|
if (!UserSearchState.isFirstSearch) $scope.searchQuery();
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.impersonate = function(userId) {
|
$scope.impersonate = function(userId) {
|
||||||
|
@ -293,6 +293,7 @@ module.controller('UserListCtrl', function($scope, realm, User, UserSearchState,
|
||||||
$scope.users = User.query($scope.query, function() {
|
$scope.users = User.query($scope.query, function() {
|
||||||
$scope.searchLoaded = true;
|
$scope.searchLoaded = true;
|
||||||
$scope.lastSearch = $scope.query.search;
|
$scope.lastSearch = $scope.query.search;
|
||||||
|
UserSearchState.isFirstSearch = false;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -347,6 +347,7 @@ module.factory('User', function($resource) {
|
||||||
});
|
});
|
||||||
|
|
||||||
module.service('UserSearchState', function() {
|
module.service('UserSearchState', function() {
|
||||||
|
this.isFirstSearch = true;
|
||||||
this.query = {
|
this.query = {
|
||||||
max : 20,
|
max : 20,
|
||||||
first : 0
|
first : 0
|
||||||
|
|
Loading…
Reference in a new issue