diff --git a/dashboard/users/role-users/role-users.component.ts b/dashboard/users/role-users/role-users.component.ts index a17a7a3b..4a1e275f 100644 --- a/dashboard/users/role-users/role-users.component.ts +++ b/dashboard/users/role-users/role-users.component.ts @@ -64,11 +64,16 @@ export class RoleUsersComponent implements OnInit, OnDestroy, OnChanges { ngOnChanges(changes: SimpleChanges) { if(changes.role) { + this.unsubscribe(); this.updateLists(); } } ngOnDestroy() { + this.unsubscribe(); + } + + unsubscribe() { this.subs.forEach(sub => { if (sub instanceof Subscription) { sub.unsubscribe(); @@ -76,6 +81,7 @@ export class RoleUsersComponent implements OnInit, OnDestroy, OnChanges { }); } + updateLists() { this.loadActive = true; this.loadPending = true;