mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-19 17:14:57 +00:00
configurable 'supportedPageSizes' for document list (#2395)
This commit is contained in:
parent
f224c594c6
commit
d789f84ed5
@ -27,6 +27,7 @@
|
||||
}
|
||||
},
|
||||
"document-list": {
|
||||
"supportedPageSizes": [5, 10, 15, 20],
|
||||
"presets": {
|
||||
"-trashcan-": [
|
||||
{
|
||||
|
@ -27,6 +27,7 @@
|
||||
}
|
||||
},
|
||||
"document-list": {
|
||||
"supportedPageSizes": [5, 10, 15, 20],
|
||||
"presets": {
|
||||
"-trashcan-": [
|
||||
{
|
||||
|
@ -111,6 +111,7 @@ The properties currentFolderId, folderNode and node are the entry initialization
|
||||
| allowDropFiles | boolean | false | Toggle file drop support for rows (see **ng2-alfresco-core/UploadDirective** for more details) |
|
||||
| sorting | string[] | | Defines default sorting. The format is an array of 2 strings `[key, direction]` i.e. `['name', 'desc']` or `['name', 'asc']`. Set this value only if you want to override default sorting detected by the component based on columns. |
|
||||
| locationFormat | string | '/' | The default route for all the location-based columns (if declared). |
|
||||
| supportedPageSizes | number[] | [5, 10, 15, 20] | Supported page sizes for the pagination component. You can also use application configuration file to set it as a global setting using `document-list.supportedPageSizes` key. |
|
||||
|
||||
#### Events
|
||||
|
||||
|
@ -58,7 +58,7 @@
|
||||
(nextPage)="onNextPage($event)"
|
||||
(prevPage)="onPrevPage($event)"
|
||||
[pagination]="pagination"
|
||||
[supportedPageSizes]="[5, 10, 15, 20]">
|
||||
[supportedPageSizes]="supportedPageSizes">
|
||||
</adf-pagination>
|
||||
|
||||
<adf-infinite-pagination
|
||||
@ -69,4 +69,4 @@
|
||||
(loadMore)="loadNextBatch($event)">
|
||||
{{ 'ADF-DOCUMENT-LIST.LAYOUT.LOAD_MORE' | translate }}
|
||||
</adf-infinite-pagination>
|
||||
</ng-container>
|
||||
</ng-container>
|
||||
|
@ -107,6 +107,9 @@ export class DocumentListComponent implements OnInit, OnChanges, AfterContentIni
|
||||
@Input()
|
||||
paginationStrategy: PaginationStrategy = PaginationStrategy.Finite;
|
||||
|
||||
@Input()
|
||||
supportedPageSizes: number[];
|
||||
|
||||
infiniteLoading: boolean = false;
|
||||
|
||||
selection = new Array<MinimalNodeEntity>();
|
||||
@ -165,6 +168,7 @@ export class DocumentListComponent implements OnInit, OnChanges, AfterContentIni
|
||||
private elementRef: ElementRef,
|
||||
private apiService: AlfrescoApiService,
|
||||
private appConfig: AppConfigService) {
|
||||
this.supportedPageSizes = appConfig.get('document-list.supportedPageSizes', [5, 10, 15, 20]);
|
||||
}
|
||||
|
||||
private get nodesApi() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user