mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ACA-3529] Custom filter doesn't work properly when Direction is set to ASC (#5829)
* [ACA-3479] Sort Order arrow not displayed in task and process list * Added unit tests * Fixed lint * Updated constant prefix * Added retention of sorting when ItemsPerPage changes * Removed unwanted changes check; Renamed sortInput * Updated unit tests * [ACA-3529] Custom filter doesn't work properly when Direction is set to "ASC" * Added server side sorting, when sort on column is changed * Added unit tests
This commit is contained in:
@@ -253,6 +253,7 @@ export class DataTableComponent implements AfterContentInit, OnChanges, DoCheck,
|
||||
this.resetSelection();
|
||||
} else if (rowChanges) {
|
||||
this.setTableRows(changes['rows'].currentValue);
|
||||
this.setTableSorting(this.sorting);
|
||||
} else {
|
||||
this.setTableColumns(changes['columns'].currentValue);
|
||||
}
|
||||
@@ -544,6 +545,7 @@ export class DataTableComponent implements AfterContentInit, OnChanges, DoCheck,
|
||||
if (current && column.key === current.key) {
|
||||
newDirection = current.direction === 'asc' ? 'desc' : 'asc';
|
||||
}
|
||||
this.sorting = [column.key, newDirection];
|
||||
this.data.setSorting(new DataSorting(column.key, newDirection));
|
||||
this.emitSortingChangedEvent(column.key, newDirection);
|
||||
}
|
||||
|
Reference in New Issue
Block a user