Merge branch 'feature/webtorrent-disabling' into develop
[oweals/peertube.git] / client / src / app / +admin / users / user-list / user-list.component.ts
index f3e7e0ead8aad4998d988ebce38810f8a484ede3..ab225072235711008699f1809e30d49de3f2d4fb 100644 (file)
@@ -35,7 +35,7 @@ export class UserListComponent extends RestTable implements OnInit {
   }
 
   ngOnInit () {
-    this.loadSort()
+    this.initialize()
 
     this.bulkUserActions = [
       {
@@ -55,20 +55,6 @@ export class UserListComponent extends RestTable implements OnInit {
     ]
   }
 
-  protected loadData () {
-    this.selectedUsers = []
-
-    this.userService.getUsers(this.pagination, this.sort)
-                    .subscribe(
-                      resultList => {
-                        this.users = resultList.data
-                        this.totalRecords = resultList.total
-                      },
-
-                      err => this.notificationsService.error(this.i18n('Error'), err.message)
-                    )
-  }
-
   openBanUserModal (users: User[]) {
     for (const user of users) {
       if (user.username === 'root') {
@@ -131,4 +117,18 @@ export class UserListComponent extends RestTable implements OnInit {
   isInSelectionMode () {
     return this.selectedUsers.length !== 0
   }
+
+  protected loadData () {
+    this.selectedUsers = []
+
+    this.userService.getUsers(this.pagination, this.sort, this.search)
+                    .subscribe(
+                      resultList => {
+                        this.users = resultList.data
+                        this.totalRecords = resultList.total
+                      },
+
+                      err => this.notificationsService.error(this.i18n('Error'), err.message)
+                    )
+  }
 }