This commit is contained in:
jonaswinkler
2021-01-04 17:08:52 +01:00
parent 32f371fcb6
commit 9bbcb9319c
7 changed files with 77 additions and 45 deletions

View File

@@ -39,21 +39,8 @@ export abstract class GenericListComponent<T extends ObjectWithId> implements On
}
onSort(event: SortEvent) {
if (event.sorted) {
this.sortField = event.column
this.sortReverse = event.reverse
} else {
this.sortField = null
this.sortReverse = false
}
this.headers.forEach(header => {
if (header.sortable !== this.sortField) {
header.sorted = false
}
});
this.sortField = event.column
this.sortReverse = event.reverse
this.reloadData()
}