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 d0ea193190..b4ed50bfa5 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 @@ -257,12 +257,6 @@ describe('DocumentList', () => { expect(calls).toBe(1); }); - it('should reload on binding changes', () => { - spyOn(documentList, 'reload').and.stub(); - documentList.ngOnChanges(); - expect(documentList.reload).toHaveBeenCalled(); - }); - it('should execute context action on callback', () => { let action = { node: {}, 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 93e5cb8591..54c3707c57 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,6 @@ import { AfterContentInit, AfterViewInit, AfterViewChecked, - OnChanges, TemplateRef, NgZone, ViewChild, @@ -59,7 +58,7 @@ declare let __moduleName: string; providers: [DocumentListService], directives: [CONTEXT_MENU_DIRECTIVES, ALFRESCO_DATATABLE_DIRECTIVES] }) -export class DocumentList implements OnInit, AfterViewInit, AfterViewChecked, AfterContentInit, OnChanges { +export class DocumentList implements OnInit, AfterViewInit, AfterViewChecked, AfterContentInit { static SINGLE_CLICK_NAVIGATION: string = 'click'; static DOUBLE_CLICK_NAVIGATION: string = 'dblclick'; @@ -165,14 +164,9 @@ export class DocumentList implements OnInit, AfterViewInit, AfterViewChecked, Af ngOnInit() { this.data.thumbnails = this.thumbnails; this.data.maxItems = this.pageSize; - this.displayFolderContent(this.currentFolderPath); this.contextActionHandler.subscribe(val => this.contextActionCallback(val)); } - ngOnChanges() { - this.reload(); - } - ngAfterContentInit() { let columns = this.data.getColumns(); if (!columns || columns.length === 0) { @@ -185,7 +179,6 @@ export class DocumentList implements OnInit, AfterViewInit, AfterViewChecked, Af if (this.emptyFolderTemplate) { this.dataTable.noContentTemplate = this.emptyFolderTemplate; } - } }