diff --git a/ng2-components/ng2-alfresco-documentlist/src/components/content-action.spec.ts b/ng2-components/ng2-alfresco-documentlist/src/components/content-action.spec.ts index cf29f3b0c9..010bf39984 100644 --- a/ng2-components/ng2-alfresco-documentlist/src/components/content-action.spec.ts +++ b/ng2-components/ng2-alfresco-documentlist/src/components/content-action.spec.ts @@ -38,7 +38,7 @@ describe('ContentAction', () => { beforeEach(() => { let alfrescoServiceMock = new AlfrescoServiceMock(); - documentList = new DocumentList(alfrescoServiceMock); + documentList = new DocumentList(alfrescoServiceMock, null); actionList = new ContentActionList(documentList); }); diff --git a/ng2-components/ng2-alfresco-documentlist/src/components/content-column-list.spec.ts b/ng2-components/ng2-alfresco-documentlist/src/components/content-column-list.spec.ts index e7364e0fcf..00f9947c0f 100644 --- a/ng2-components/ng2-alfresco-documentlist/src/components/content-column-list.spec.ts +++ b/ng2-components/ng2-alfresco-documentlist/src/components/content-column-list.spec.ts @@ -34,7 +34,7 @@ describe('ContentColumnList', () => { beforeEach(() => { let alfrescoServiceMock = new AlfrescoServiceMock(); - documentList = new DocumentList(alfrescoServiceMock); + documentList = new DocumentList(alfrescoServiceMock, null); columnList = new ContentColumnList(documentList); }); diff --git a/ng2-components/ng2-alfresco-documentlist/src/components/content-column.spec.ts b/ng2-components/ng2-alfresco-documentlist/src/components/content-column.spec.ts index 764a248dc7..b3aa603c31 100644 --- a/ng2-components/ng2-alfresco-documentlist/src/components/content-column.spec.ts +++ b/ng2-components/ng2-alfresco-documentlist/src/components/content-column.spec.ts @@ -34,7 +34,7 @@ describe('ContentColumn', () => { beforeEach(() => { let alfrescoServiceMock = new AlfrescoServiceMock(); - documentList = new DocumentList(alfrescoServiceMock); + documentList = new DocumentList(alfrescoServiceMock, null); columnList = new ContentColumnList(documentList); }); diff --git a/ng2-components/ng2-alfresco-documentlist/src/components/document-list.spec.ts b/ng2-components/ng2-alfresco-documentlist/src/components/document-list.spec.ts index 30d12057e8..67898ecac6 100644 --- a/ng2-components/ng2-alfresco-documentlist/src/components/document-list.spec.ts +++ b/ng2-components/ng2-alfresco-documentlist/src/components/document-list.spec.ts @@ -36,7 +36,7 @@ describe('DocumentList', () => { beforeEach(() => { alfrescoServiceMock = new AlfrescoServiceMock(); - documentList = new DocumentList(alfrescoServiceMock); + documentList = new DocumentList(alfrescoServiceMock, null); eventMock = { preventDefault: function () { @@ -105,7 +105,7 @@ describe('DocumentList', () => { }); it('should return no thumbnail url without service', () => { - let list = new DocumentList(null); + let list = new DocumentList(null, null); let node = new MinimalNodeEntity(); expect(list.getThumbnailUrl(node)).toBeNull(); }); 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 2d45a61e0b..6075827aaa 100644 --- a/ng2-components/ng2-alfresco-documentlist/src/components/document-list.ts +++ b/ng2-components/ng2-alfresco-documentlist/src/components/document-list.ts @@ -24,7 +24,8 @@ import { AfterContentInit, AfterViewChecked, OnChanges, - TemplateRef + TemplateRef, + NgZone } from '@angular/core'; import { DatePipe } from '@angular/common'; import { Subject } from 'rxjs/Rx'; @@ -120,7 +121,9 @@ export class DocumentList implements OnInit, AfterViewChecked, AfterContentInit, contextActionHandler: Subject = new Subject(); - constructor(private alfrescoService: AlfrescoService) {} + constructor( + private alfrescoService: AlfrescoService, + private ngZone: NgZone) {} getContextActions(node: MinimalNodeEntity) { if (node && node.entry) { @@ -320,9 +323,11 @@ export class DocumentList implements OnInit, AfterViewChecked, AfterContentInit, } reload() { - if (this.currentFolderPath) { - this.displayFolderContent(this.currentFolderPath); - } + this.ngZone.run(() => { + if (this.currentFolderPath) { + this.displayFolderContent(this.currentFolderPath); + } + }); } /**