[Library | Trunk]: Roles users unsubscribe on role change
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@60304 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
a31eddcc2c
commit
4e7ec1504e
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue