Skip to content

Commit

Permalink
fix(GDU): ExpressionChangedAfterItHasBeenCheckedError perfiles
Browse files Browse the repository at this point in the history
  • Loading branch information
plammel committed Oct 9, 2020
1 parent 8755c26 commit 568315b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
11 changes: 1 addition & 10 deletions src/app/apps/gestor-usuarios/services/perfiles.http.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs/Observable';
import { Server } from '@andes/shared';
import { Server, cache } from '@andes/shared';
import { BehaviorSubject, zip } from 'rxjs';
import { switchMap, distinctUntilChanged, map, tap, merge } from 'rxjs/operators';
import { cache } from '@andes/shared';

let shiroTrie = require('shiro-trie');

Expand Down Expand Up @@ -53,14 +52,6 @@ export class PerfilesHttp {
);
}

get selectID() {
const perfil = this.selected.getValue();
if (perfil) {
return perfil.id;
}
return null;
}

// *****************************************************************
save(perfil) {
if (!perfil.id) {
Expand Down
5 changes: 3 additions & 2 deletions src/app/apps/gestor-usuarios/views/perfiles-list.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ import { Auth } from '@andes/auth';
})

export class PerfilListComponent implements OnInit {
selectedId;

constructor(
public perfilesHttp: PerfilesHttp,
public plex: Plex,
private location: Location,
private router: Router,
private route: ActivatedRoute,
private auth: Auth
Expand All @@ -39,11 +39,12 @@ export class PerfilListComponent implements OnInit {
}

select(perfil) {
this.selectedId = perfil.id;
this.router.navigate([perfil.id], { relativeTo: this.route, replaceUrl: true });
}

isSelected(perfil) {
return this.perfilesHttp.selectID === perfil.id;
return this.selectedId === perfil.id;
}

remove(perfil) {
Expand Down

0 comments on commit 568315b

Please sign in to comment.