Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

184
Visualizações
angular loader leaves a highlight color

Why is that after the loader is closed it leaves a highlight color as you can see on the screenshow below ?

When the page Initialize I wanted to get the total deals count first and while it is getting the count it should show the showLoader and should stop loading or trigger the closeLoader if it gets the getCount result.

Right now as you can see on the screenshot after loader is done there is a color highlight or bug highlight on the tab , it should not show after the loader is done loading.

Right now I have to click first outside the tab before the color highlight dissapear.

enter image description here

#code

export class DealsTransactionComponent implements OnInit, OnChanges  {
  @ViewChild(TableMultiSortComponent, { static: true }) tableMultiSortComponent: TableMultiSortComponent;
  transactionSubscripion: Subscription;
  tableOptions: any;
  @Input() transaction: any;
  @ViewChild('table') tableCompoonent: TableMultiSortComponent;

  constructor(
    
  ) {}
  ngOnInit(): void {

     this.showLoader('Loading list of deals');

  }

  ngOnChanges(changes: SimpleChanges): void {
    this.subscription = this.dealTransactionService.dataSubject.subscribe((data: any) => {
     if(!data.actionName) {
       this.refreshDealDetailsPage(data);
     }
    });
 }
  ngOnDestroy(): void {
    this.subscription?.unsubscribe();
  }
  showLoader(dialogMsg : string) {
    LOADER_DIALOG_CONFIG.data = { text: dialogMsg };
    this.dialog.open(LoaderDialogComponent, LOADER_DIALOG_CONFIG);
  }
  closeLoader() {
    this.dialog.closeAll();
  }
  private getCount(item: any) {
    let status = item;
    return this.dealService.getCount(
          this.accountId,
          this.transaction.id,
          status
    )
  }

  getAllDealsCount() {
    this.isInProgress = true;
    const observableResult = zip(
        this.getCount('ForApproval'),
        this.getCount('Draft')
    );

    observableResult.subscribe((res: any[]) => {
      this.isInProgress = false;
      this.closeLoader();
      this.forApprovalResponse = res[0]?.data;
      this.hasPendingAprroval = res[0].data > 0;
      const draftResponse = res[1]?.data;
      
      this.totalDeals = this.forApprovalResponse  + draftResponse;
       
       if (this.forApprovalResponse && this.forApprovalResponse > 0) {
        this.tableOptions.columns
        .filter(column => column.actions)
        .flatMap(column => column.actions)
        .filter(action => action.name === 'For Approval')
        .forEach(action => (action.disabled = true))    
       }
    }); 
 }
}
about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda