mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
[ADF-3120] fixed sorting for tasklist and process list (#3435)
* [ADF-3120] fixed sorting for tasklist and process list * [ADF-3120] removed commented code * [ADF-3120] fixing another randomly failing test
This commit is contained in:
@@ -174,10 +174,18 @@ export class ProcessInstanceListComponent implements OnChanges, AfterContentInit
|
||||
|
||||
ngOnChanges(changes: SimpleChanges) {
|
||||
if (this.isPropertyChanged(changes)) {
|
||||
if (this.isSortChanged(changes)) {
|
||||
this.sorting = this.sort ? this.sort.split('-') : this.sorting;
|
||||
}
|
||||
this.reload();
|
||||
}
|
||||
}
|
||||
|
||||
private isSortChanged(changes: SimpleChanges): boolean {
|
||||
const actualSort = changes['sort'];
|
||||
return actualSort && actualSort.currentValue && actualSort.currentValue !== actualSort.previousValue;
|
||||
}
|
||||
|
||||
private isPropertyChanged(changes: SimpleChanges): boolean {
|
||||
let changed: boolean = false;
|
||||
|
||||
@@ -293,14 +301,6 @@ export class ProcessInstanceListComponent implements OnChanges, AfterContentInit
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sort the process based on current value of 'sort' property
|
||||
* Return the sorting order
|
||||
*/
|
||||
get dataSort(): any[] {
|
||||
return this.sort ? this.sort.split('-') : this.sorting;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the current id
|
||||
*/
|
||||
|
Reference in New Issue
Block a user