From dd61cf7b45c6e8eb3386275b615ee0f02afe3bf1 Mon Sep 17 00:00:00 2001 From: Denys Vuika Date: Fri, 7 Jul 2017 12:44:32 +0100 Subject: [PATCH] [ADF-1015] make "loading" state two-way bindable (document list) (#2052) * make "loading" state two-way bindable * update documentation - update readme - move "loading" property up to @Input properties --- ng2-components/ng2-alfresco-documentlist/README.md | 1 + .../src/components/document-list.component.ts | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ng2-components/ng2-alfresco-documentlist/README.md b/ng2-components/ng2-alfresco-documentlist/README.md index 59a543aead..b41fe91d00 100644 --- a/ng2-components/ng2-alfresco-documentlist/README.md +++ b/ng2-components/ng2-alfresco-documentlist/README.md @@ -90,6 +90,7 @@ The properties currentFolderId, folderNode and node are the entry initialization | folderNode | [MinimalNodeEntryEntity](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/NodeMinimalEntry.md) | null | Currently displayed folder node | | node | `NodePaging` | null | Document list will show all the node contained in the NodePaging entity | | navigate | boolean | true | Toggles navigation to folder content or file preview | +| loading | boolean | false | Toggles the loading state and animated spinners for the component. Used in combination with `navigate=false` to perform custom navigation and loading state indication. | | navigationMode | string (click,dblclick) | dblclick | User interaction for folder navigation or file preview | | thumbnails | boolean | false | Show document thumbnails rather than icons | | multiselect | boolean | false | Toggles multiselect mode | diff --git a/ng2-components/ng2-alfresco-documentlist/src/components/document-list.component.ts b/ng2-components/ng2-alfresco-documentlist/src/components/document-list.component.ts index 231abc4d89..030e2795e1 100644 --- a/ng2-components/ng2-alfresco-documentlist/src/components/document-list.component.ts +++ b/ng2-components/ng2-alfresco-documentlist/src/components/document-list.component.ts @@ -99,6 +99,9 @@ export class DocumentListComponent implements OnInit, OnChanges, AfterContentIni @Input() rowStyleClass: string; + @Input() + loading: boolean = false; + skipCount: number = 0; pagination: Pagination; @@ -161,7 +164,6 @@ export class DocumentListComponent implements OnInit, OnChanges, AfterContentIni contextActionHandler: Subject = new Subject(); data: ShareDataTableAdapter; - loading: boolean = false; private currentNodeAllowableOperations: string[] = []; private CREATE_PERMISSION = 'create';