diff --git a/src/app/components/tabels/table-component.base.ts b/src/app/components/tabels/table-component.base.ts index 0ad8702..1f23e07 100644 --- a/src/app/components/tabels/table-component.base.ts +++ b/src/app/components/tabels/table-component.base.ts @@ -9,6 +9,10 @@ export abstract class TableComponentBase number) { if (this.sortBy === by) { this.sortDescending = !this.sortDescending; @@ -44,6 +63,11 @@ export abstract class TableComponentBase string) { if (this.sortBy === by) { this.sortDescending = !this.sortDescending; @@ -57,6 +81,11 @@ export abstract class TableComponentBase Date) { if (this.sortBy === by) { this.sortDescending = !this.sortDescending; @@ -70,10 +99,16 @@ export abstract class TableComponentBase obj.id); } + /** + * Sorts this tabel's items by title + */ public sortByTitle() { this.doStringSort('title', (obj) => obj.title); }