use ngIf for editor components to maybe help performance

This commit is contained in:
Michael Shamoon 2020-12-21 11:12:48 -08:00
parent 29e9d7d793
commit 48d83e166b
2 changed files with 11 additions and 5 deletions

View File

@ -78,9 +78,9 @@
</app-page-header>
<div class="w-100 mb-2 mb-sm-4">
<app-filter-editor [hidden]="isBulkEditing" [(filterRules)]="list.filterRules" #filterEditor></app-filter-editor>
<app-filter-editor *ngIf="!isBulkEditing" [(filterRules)]="list.filterRules" #filterEditor></app-filter-editor>
<app-bulk-editor [hidden]="!isBulkEditing"
<app-bulk-editor *ngIf="isBulkEditing"
[viewDocuments]="list.documents"
[(selectedDocuments)]="list.selected"
(selectPage)="list.selectPage()"

View File

@ -120,17 +120,23 @@ export class DocumentListComponent implements OnInit {
clickTag(tagID: number) {
this.list.selectNone()
this.filterEditor.toggleTag(tagID)
setTimeout(() => {
this.filterEditor.toggleTag(tagID)
})
}
clickCorrespondent(correspondentID: number) {
this.list.selectNone()
this.filterEditor.toggleCorrespondent(correspondentID)
setTimeout(() => {
this.filterEditor.toggleCorrespondent(correspondentID)
})
}
clickDocumentType(documentTypeID: number) {
this.list.selectNone()
this.filterEditor.toggleDocumentType(documentTypeID)
setTimeout(() => {
this.filterEditor.toggleDocumentType(documentTypeID)
})
}
private executeBulkOperation(method: string, args): Observable<any> {