[ADF-3930] Can't load more results in Copy/Move dialog (#4247)

* fix unrelated failing test
improve type definition
add set get filtering node selector
fix directive highlight
fix minor problem style breadcrumb
small refactoring problem documentlist

* fix lint style

* fix html node

* fix test
This commit is contained in:
Eugenio Romano
2019-02-03 20:10:54 +00:00
committed by GitHub
parent 50572e9db5
commit fec2b89b2d
25 changed files with 288 additions and 362 deletions

View File

@@ -15,7 +15,17 @@
* limitations under the License.
*/
import { Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges, ViewChild, ViewEncapsulation } from '@angular/core';
import {
Component,
EventEmitter,
Input,
OnChanges,
OnInit,
Output,
SimpleChanges,
ViewChild,
ViewEncapsulation
} from '@angular/core';
import { MatSelect } from '@angular/material';
import { Node, PathElementEntity } from '@alfresco/js-api';
import { DocumentListComponent } from '../document-list';
@@ -84,23 +94,24 @@ export class BreadcrumbComponent implements OnInit, OnChanges {
ngOnInit() {
this.transform = this.transform ? this.transform : null;
if (this.target) {
this.target.$folderNode.subscribe((folderNode: Node) => {
this.folderNode = folderNode;
this.recalculateNodes();
});
}
}
ngOnChanges(changes: SimpleChanges): void {
if (changes.folderNode) {
let node: Node = null;
node = this.transform ? this.transform(changes.folderNode.currentValue) : changes.folderNode.currentValue;
this.route = this.parseRoute(node);
}
if (changes.transform) {
let node = this.transform ? this.transform(this.folderNode) : this.folderNode;
this.route = this.parseRoute(node);
}
this.recalculateNodes();
}
protected recalculateNodes(): void {
let node: Node = this.transform ? this.transform(this.folderNode) : this.folderNode;
this.route = this.parseRoute(node);
if (this.maxItems && this.route.length > this.maxItems) {
this.lastNodes = this.route.slice(this.route.length - this.maxItems);
this.previousNodes = this.route.slice(0, this.route.length - this.maxItems);
@@ -127,7 +138,8 @@ export class BreadcrumbComponent implements OnInit, OnChanges {
route.push(<PathElementEntity> {
id: node.id,
name: node.name
name: node.name,
node: node
});
const rootPos = this.getElementPosition(route, this.rootId);