From cf722381d6f1dd23974b75ce0bb49012f807326f Mon Sep 17 00:00:00 2001 From: Niggl Date: Fri, 10 Jul 2020 21:41:51 +0200 Subject: [PATCH] Added comments to the table component base --- .../components/tabels/table-component.base.ts | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) 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); }