mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-31 17:38:28 +00:00
[ACA-3752][ADW] Pagination values are not passed when a filter is applied (#1547)
This commit is contained in:
@@ -1,12 +1,6 @@
|
|||||||
<aca-page-layout [hasError]="!isValidPath">
|
<aca-page-layout [hasError]="!isValidPath">
|
||||||
<aca-page-layout-header>
|
<aca-page-layout-header>
|
||||||
<adf-breadcrumb
|
<adf-breadcrumb [root]="title" [folderNode]="node" [maxItems]="isSmallScreen ? 1 : 0" (navigate)="onBreadcrumbNavigate($event)"> </adf-breadcrumb>
|
||||||
[root]="title"
|
|
||||||
[folderNode]="node"
|
|
||||||
[maxItems]="isSmallScreen ? 1 : 0"
|
|
||||||
(navigate)="onBreadcrumbNavigate($event)"
|
|
||||||
>
|
|
||||||
</adf-breadcrumb>
|
|
||||||
|
|
||||||
<adf-toolbar class="adf-toolbar--inline">
|
<adf-toolbar class="adf-toolbar--inline">
|
||||||
<ng-container *ngFor="let entry of actions; trackBy: trackByActionId">
|
<ng-container *ngFor="let entry of actions; trackBy: trackByActionId">
|
||||||
@@ -21,11 +15,7 @@
|
|||||||
|
|
||||||
<aca-page-layout-content>
|
<aca-page-layout-content>
|
||||||
<div class="main-content">
|
<div class="main-content">
|
||||||
<adf-upload-drag-area
|
<adf-upload-drag-area [rootFolderId]="node?.id" [disabled]="!canUpload" (updateFileVersion)="onUploadNewVersion($event)">
|
||||||
[rootFolderId]="node?.id"
|
|
||||||
[disabled]="!canUpload"
|
|
||||||
(updateFileVersion)="onUploadNewVersion($event)"
|
|
||||||
>
|
|
||||||
<adf-document-list
|
<adf-document-list
|
||||||
#documentList
|
#documentList
|
||||||
acaDocumentList
|
acaDocumentList
|
||||||
@@ -47,8 +37,8 @@
|
|||||||
<adf-search-header
|
<adf-search-header
|
||||||
[col]="col"
|
[col]="col"
|
||||||
[currentFolderNodeId]="node?.id"
|
[currentFolderNodeId]="node?.id"
|
||||||
[maxItems]="pagination?.maxItems"
|
[maxItems]="(documentList?.pagination | async)?.maxItems"
|
||||||
[skipCount]="pagination?.skipCount"
|
[skipCount]="(documentList?.pagination | async)?.skipCount"
|
||||||
(update)="onFilterUpdate($event)"
|
(update)="onFilterUpdate($event)"
|
||||||
(clear)="onAllFilterCleared()"
|
(clear)="onAllFilterCleared()"
|
||||||
>
|
>
|
||||||
@@ -57,11 +47,7 @@
|
|||||||
</adf-custom-header-filter-template>
|
</adf-custom-header-filter-template>
|
||||||
<data-columns>
|
<data-columns>
|
||||||
<ng-container *ngFor="let column of columns; trackBy: trackById">
|
<ng-container *ngFor="let column of columns; trackBy: trackById">
|
||||||
<ng-container
|
<ng-container *ngIf="column.template && !(column.desktopOnly && isSmallScreen)">
|
||||||
*ngIf="
|
|
||||||
column.template && !(column.desktopOnly && isSmallScreen)
|
|
||||||
"
|
|
||||||
>
|
|
||||||
<data-column
|
<data-column
|
||||||
[key]="column.key"
|
[key]="column.key"
|
||||||
[title]="column.title"
|
[title]="column.title"
|
||||||
@@ -71,20 +57,12 @@
|
|||||||
[sortable]="column.sortable"
|
[sortable]="column.sortable"
|
||||||
>
|
>
|
||||||
<ng-template let-context>
|
<ng-template let-context>
|
||||||
<adf-dynamic-column
|
<adf-dynamic-column [id]="column.template" [context]="context"> </adf-dynamic-column>
|
||||||
[id]="column.template"
|
|
||||||
[context]="context"
|
|
||||||
>
|
|
||||||
</adf-dynamic-column>
|
|
||||||
</ng-template>
|
</ng-template>
|
||||||
</data-column>
|
</data-column>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<ng-container
|
<ng-container *ngIf="!column.template && !(column.desktopOnly && isSmallScreen)">
|
||||||
*ngIf="
|
|
||||||
!column.template && !(column.desktopOnly && isSmallScreen)
|
|
||||||
"
|
|
||||||
>
|
|
||||||
<data-column
|
<data-column
|
||||||
[key]="column.key"
|
[key]="column.key"
|
||||||
[title]="column.title"
|
[title]="column.title"
|
||||||
|
@@ -28,7 +28,7 @@ import { ShowHeaderMode } from '@alfresco/adf-core';
|
|||||||
import { ContentActionRef, SelectionState } from '@alfresco/adf-extensions';
|
import { ContentActionRef, SelectionState } from '@alfresco/adf-extensions';
|
||||||
import { OnDestroy, OnInit, OnChanges, ViewChild, SimpleChanges, Directive } from '@angular/core';
|
import { OnDestroy, OnInit, OnChanges, ViewChild, SimpleChanges, Directive } from '@angular/core';
|
||||||
import { Store } from '@ngrx/store';
|
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 { Observable, Subject, Subscription } from 'rxjs';
|
||||||
import { takeUntil, map } from 'rxjs/operators';
|
import { takeUntil, map } from 'rxjs/operators';
|
||||||
import { ContentManagementService } from '../services/content-management.service';
|
import { ContentManagementService } from '../services/content-management.service';
|
||||||
@@ -65,7 +65,6 @@ export abstract class PageComponent implements OnInit, OnDestroy, OnChanges {
|
|||||||
canUpdateNode = false;
|
canUpdateNode = false;
|
||||||
canUpload = false;
|
canUpload = false;
|
||||||
nodeResult: NodePaging;
|
nodeResult: NodePaging;
|
||||||
pagination: Pagination;
|
|
||||||
showHeader = ShowHeaderMode.Always;
|
showHeader = ShowHeaderMode.Always;
|
||||||
|
|
||||||
protected subscriptions: Subscription[] = [];
|
protected subscriptions: Subscription[] = [];
|
||||||
@@ -98,12 +97,6 @@ export abstract class PageComponent implements OnInit, OnDestroy, OnChanges {
|
|||||||
.subscribe((node) => {
|
.subscribe((node) => {
|
||||||
this.canUpload = node && this.content.canUploadContent(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) {
|
ngOnChanges(changes: SimpleChanges) {
|
||||||
|
Reference in New Issue
Block a user