[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
This commit is contained in:
Denys Vuika 2017-07-07 12:44:32 +01:00 committed by Eugenio Romano
parent 012d62eb55
commit dd61cf7b45
2 changed files with 4 additions and 1 deletions

View File

@ -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 | | 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 | | 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 | | 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 | | navigationMode | string (click,dblclick) | dblclick | User interaction for folder navigation or file preview |
| thumbnails | boolean | false | Show document thumbnails rather than icons | | thumbnails | boolean | false | Show document thumbnails rather than icons |
| multiselect | boolean | false | Toggles multiselect mode | | multiselect | boolean | false | Toggles multiselect mode |

View File

@ -99,6 +99,9 @@ export class DocumentListComponent implements OnInit, OnChanges, AfterContentIni
@Input() @Input()
rowStyleClass: string; rowStyleClass: string;
@Input()
loading: boolean = false;
skipCount: number = 0; skipCount: number = 0;
pagination: Pagination; pagination: Pagination;
@ -161,7 +164,6 @@ export class DocumentListComponent implements OnInit, OnChanges, AfterContentIni
contextActionHandler: Subject<any> = new Subject(); contextActionHandler: Subject<any> = new Subject();
data: ShareDataTableAdapter; data: ShareDataTableAdapter;
loading: boolean = false;
private currentNodeAllowableOperations: string[] = []; private currentNodeAllowableOperations: string[] = [];
private CREATE_PERMISSION = 'create'; private CREATE_PERMISSION = 'create';