pagination: RestPagination = { count: this.rowsPerPage, start: 0 }
selectedUsers: User[] = []
- bulkUserActions: DropdownAction<User>[] = []
+ bulkUserActions: DropdownAction<User[]>[] = []
constructor (
private notificationsService: NotificationsService,
}
ngOnInit () {
- this.loadSort()
+ this.initialize()
this.bulkUserActions = [
{
]
}
- 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') {
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)
+ )
+ }
}