[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:
Mercy Chrysolite
2020-07-07 17:39:27 +05:30
committed by GitHub
parent 4ae484c617
commit ed12b13c87
7 changed files with 161 additions and 16 deletions

View File

@@ -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);
}