mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-2387] added a stream for pagination size change (#3014)
* [ADF-2387] added a stream for pagination size change * [ADF-2387] added test for page size stream * [ADF-2387] start refactoring adding a general stream for user preference attributes * [ADF-2387] added documentation and test for user values stream
This commit is contained in:
@@ -29,7 +29,8 @@ import {
|
||||
PaginationComponent,
|
||||
PaginatedComponent,
|
||||
PaginationQueryParams,
|
||||
UserPreferencesService
|
||||
UserPreferencesService,
|
||||
UserPreferenceValues
|
||||
} from '@alfresco/adf-core';
|
||||
import {
|
||||
AfterContentInit,
|
||||
@@ -163,7 +164,11 @@ export class TaskListComponent implements OnChanges, OnInit, AfterContentInit, P
|
||||
constructor(private taskListService: TaskListService,
|
||||
private appConfig: AppConfigService,
|
||||
private userPreferences: UserPreferencesService) {
|
||||
this.size = this.userPreferences.paginationSize;
|
||||
|
||||
this.userPreferences.select(UserPreferenceValues.PaginationSize).subscribe((pageSize) => {
|
||||
this.size = pageSize;
|
||||
});
|
||||
|
||||
this.pagination = new BehaviorSubject<Pagination>(<Pagination> {
|
||||
maxItems: this.size,
|
||||
skipCount: 0,
|
||||
|
Reference in New Issue
Block a user