[on-push-strategy | DONE | CHANGED]: result-preview.component.ts: Set changeDetection: ChangeDetectionStrategy.OnPush | searchResult.component.ts & result-preview.component.html: Redraw html when needed with onPush strategy.

This commit is contained in:
Konstantina Galouni 2024-04-16 10:23:07 +03:00
parent c219c8370b
commit 1613916dfd
3 changed files with 3 additions and 3 deletions

View File

@ -78,7 +78,7 @@ export class SearchResultComponent implements OnInit, OnChanges {
// console.debug(i, this.previewResults[i].orcidPutCodes);
}
}
// this.previewResults = JSON.parse(JSON.stringify(this.previewResults, this.replacer), this.reviver);
this.previewResults = JSON.parse(JSON.stringify(this.previewResults, this.replacer), this.reviver);
}, error => {
}

View File

@ -218,7 +218,7 @@
<div *ngIf="result.oaRoutes" class="uk-first-column">
<!-- class="metrics uk-text-xsmall uk-width-auto uk-flex uk-flex-middle uk-flex-right uk-text-meta">-->
<a class="uk-flex uk-flex-middle uk-link-reset">
<span #badge class="access-route-badge" [ngClass]="'dots-' + badge.children.length.toString()">
<span #badge class="access-route-badge" [ngClass]="'dots-' + countDots">
<span *ngIf="result.oaRoutes.green" class="dot green"></span>
<span *ngIf="result.oaRoutes.oaColor" class="dot" [ngClass]="result.oaRoutes.oaColor"></span>
<span *ngIf="result.oaRoutes.isInDiamondJournal" class="dot diamond"></span>

View File

@ -13,7 +13,7 @@ import {NumberUtils} from '../number-utils.class';
selector: 'result-preview',
templateUrl: 'result-preview.component.html',
styleUrls: ['result-preview.component.less'],
// changeDetection: ChangeDetectionStrategy.OnPush
changeDetection: ChangeDetectionStrategy.OnPush
})
export class ResultPreviewComponent implements OnInit, OnChanges {
@Input() prevPath: string = "";