mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 07:07:35 +01:00
Fixes #5094 Now show list based on whether or not a search query is defined. The autocomplete function from the directive is encapsulated so that it can be called and then the query can be set to null.
This commit is contained in:
@@ -232,6 +232,11 @@ habitrpg.controller("GroupsCtrl", ['$scope', '$rootScope', 'Shared', 'Groups', '
|
||||
return user.indexOf(text) == 0;
|
||||
}
|
||||
|
||||
$scope.performCompletion = function(msg) {
|
||||
$scope.autoComplete(msg);
|
||||
$scope.query = null;
|
||||
}
|
||||
|
||||
$scope.addNewUser = function(user) {
|
||||
if($.inArray(user.user,$scope.usernames) == -1) {
|
||||
user.username = user.user;
|
||||
|
||||
Reference in New Issue
Block a user