From 7f0f4707cd80a68539c0819bc4cfed4c4d1e0b76 Mon Sep 17 00:00:00 2001 From: Denys Vuika Date: Fri, 13 May 2016 15:09:14 +0100 Subject: [PATCH] #9 reload document list api --- .../src/components/document-list.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ng2-components/ng2-alfresco-documentlist/src/components/document-list.ts b/ng2-components/ng2-alfresco-documentlist/src/components/document-list.ts index c87bea6f86..6616d15fbb 100644 --- a/ng2-components/ng2-alfresco-documentlist/src/components/document-list.ts +++ b/ng2-components/ng2-alfresco-documentlist/src/components/document-list.ts @@ -222,7 +222,7 @@ export class DocumentList implements OnInit, AfterViewChecked, AfterContentInit * @param path Node path */ displayFolderContent(path) { - if (path !== null) { + if (path !== null && path !== this.currentFolderPath) { this.folderClick.emit({ value: path }); @@ -236,6 +236,12 @@ export class DocumentList implements OnInit, AfterViewChecked, AfterContentInit } } + reload() { + if (this.currentFolderPath) { + this.displayFolderContent(this.currentFolderPath); + } + } + /** * Gets a path for a given node. * @param node