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:
@@ -32,7 +32,7 @@ import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { ProcessInstanceFilterRepresentation, Pagination } from 'alfresco-js-api';
|
||||
import {
|
||||
FORM_FIELD_VALIDATORS, FormEvent, FormFieldEvent, FormRenderingService, FormService,
|
||||
DynamicTableRow, ValidateDynamicTableRowEvent, AppConfigService, PaginationComponent
|
||||
DynamicTableRow, ValidateDynamicTableRowEvent, AppConfigService, PaginationComponent, UserPreferenceValues
|
||||
} from '@alfresco/adf-core';
|
||||
|
||||
import { AnalyticsReportListComponent } from '@alfresco/adf-insights';
|
||||
@@ -166,7 +166,7 @@ export class ProcessServiceComponent implements AfterViewInit, OnDestroy, OnInit
|
||||
private preferenceService: UserPreferencesService) {
|
||||
this.dataTasks = new ObjectDataTableAdapter();
|
||||
this.dataTasks.setSorting(new DataSorting('created', 'desc'));
|
||||
this.paginationPageSize = this.preferenceService.paginationSize;
|
||||
|
||||
|
||||
this.defaultProcessName = this.appConfig.get<string>('adf-start-process.name');
|
||||
this.defaultProcessDefinitionName = this.appConfig.get<string>('adf-start-process.processDefinitionName');
|
||||
@@ -185,6 +185,10 @@ export class ProcessServiceComponent implements AfterViewInit, OnDestroy, OnInit
|
||||
this.logService.log(`Field value changed. Form: ${e.form.id}, Field: ${e.field.id}, Value: ${e.field.value}`);
|
||||
});
|
||||
|
||||
this.preferenceService.select(UserPreferenceValues.PaginationSize).subscribe((pageSize) => {
|
||||
this.paginationPageSize = pageSize;
|
||||
});
|
||||
|
||||
formService.validateDynamicTableRow.subscribe(
|
||||
(validateDynamicTableRowEvent: ValidateDynamicTableRowEvent) => {
|
||||
const row: DynamicTableRow = validateDynamicTableRowEvent.row;
|
||||
|
Reference in New Issue
Block a user