[ACA-3752][ADW] Pagination values are not passed when a filter is applied (#1547)

This commit is contained in:
dhrn
2020-07-22 19:01:10 +05:30
committed by GitHub
parent 8f004523ea
commit d414e540c9
2 changed files with 8 additions and 37 deletions

View File

@@ -1,12 +1,6 @@
<aca-page-layout [hasError]="!isValidPath">
<aca-page-layout-header>
<adf-breadcrumb
[root]="title"
[folderNode]="node"
[maxItems]="isSmallScreen ? 1 : 0"
(navigate)="onBreadcrumbNavigate($event)"
>
</adf-breadcrumb>
<adf-breadcrumb [root]="title" [folderNode]="node" [maxItems]="isSmallScreen ? 1 : 0" (navigate)="onBreadcrumbNavigate($event)"> </adf-breadcrumb>
<adf-toolbar class="adf-toolbar--inline">
<ng-container *ngFor="let entry of actions; trackBy: trackByActionId">
@@ -21,11 +15,7 @@
<aca-page-layout-content>
<div class="main-content">
<adf-upload-drag-area
[rootFolderId]="node?.id"
[disabled]="!canUpload"
(updateFileVersion)="onUploadNewVersion($event)"
>
<adf-upload-drag-area [rootFolderId]="node?.id" [disabled]="!canUpload" (updateFileVersion)="onUploadNewVersion($event)">
<adf-document-list
#documentList
acaDocumentList
@@ -47,8 +37,8 @@
<adf-search-header
[col]="col"
[currentFolderNodeId]="node?.id"
[maxItems]="pagination?.maxItems"
[skipCount]="pagination?.skipCount"
[maxItems]="(documentList?.pagination | async)?.maxItems"
[skipCount]="(documentList?.pagination | async)?.skipCount"
(update)="onFilterUpdate($event)"
(clear)="onAllFilterCleared()"
>
@@ -57,11 +47,7 @@
</adf-custom-header-filter-template>
<data-columns>
<ng-container *ngFor="let column of columns; trackBy: trackById">
<ng-container
*ngIf="
column.template && !(column.desktopOnly && isSmallScreen)
"
>
<ng-container *ngIf="column.template && !(column.desktopOnly && isSmallScreen)">
<data-column
[key]="column.key"
[title]="column.title"
@@ -71,20 +57,12 @@
[sortable]="column.sortable"
>
<ng-template let-context>
<adf-dynamic-column
[id]="column.template"
[context]="context"
>
</adf-dynamic-column>
<adf-dynamic-column [id]="column.template" [context]="context"> </adf-dynamic-column>
</ng-template>
</data-column>
</ng-container>
<ng-container
*ngIf="
!column.template && !(column.desktopOnly && isSmallScreen)
"
>
<ng-container *ngIf="!column.template && !(column.desktopOnly && isSmallScreen)">
<data-column
[key]="column.key"
[title]="column.title"

View File

@@ -28,7 +28,7 @@ import { ShowHeaderMode } from '@alfresco/adf-core';
import { ContentActionRef, SelectionState } from '@alfresco/adf-extensions';
import { OnDestroy, OnInit, OnChanges, ViewChild, SimpleChanges, Directive } from '@angular/core';
import { Store } from '@ngrx/store';
import { MinimalNodeEntity, MinimalNodeEntryEntity, Pagination, NodePaging } from '@alfresco/js-api';
import { MinimalNodeEntity, MinimalNodeEntryEntity, NodePaging } from '@alfresco/js-api';
import { Observable, Subject, Subscription } from 'rxjs';
import { takeUntil, map } from 'rxjs/operators';
import { ContentManagementService } from '../services/content-management.service';
@@ -65,7 +65,6 @@ export abstract class PageComponent implements OnInit, OnDestroy, OnChanges {
canUpdateNode = false;
canUpload = false;
nodeResult: NodePaging;
pagination: Pagination;
showHeader = ShowHeaderMode.Always;
protected subscriptions: Subscription[] = [];
@@ -98,12 +97,6 @@ export abstract class PageComponent implements OnInit, OnDestroy, OnChanges {
.subscribe((node) => {
this.canUpload = node && this.content.canUploadContent(node);
});
if (this.documentList && this.documentList.pagination) {
this.documentList.pagination.pipe(takeUntil(this.onDestroy$)).subscribe((newPagination: Pagination) => {
this.pagination = newPagination;
});
}
}
ngOnChanges(changes: SimpleChanges) {