From bb6324a9c3fd62baca81f44ce0e037513d0bb3c6 Mon Sep 17 00:00:00 2001 From: Vicki League Date: Wed, 25 Jun 2025 16:58:49 -0400 Subject: [PATCH] table module improvements --- libs/components/src/table/sortable.component.ts | 6 +++--- libs/components/src/table/table-scroll.component.ts | 2 +- libs/components/src/table/table.component.ts | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/libs/components/src/table/sortable.component.ts b/libs/components/src/table/sortable.component.ts index 88313ab72f0..43a47ba42ab 100644 --- a/libs/components/src/table/sortable.component.ts +++ b/libs/components/src/table/sortable.component.ts @@ -26,9 +26,9 @@ export class SortableComponent implements OnInit { /** * Mark the column as sortable and specify the key to sort by */ - readonly bitSortable = input(undefined); + readonly bitSortable = input(); - default = input(false, { + readonly default = input(false, { transform: (value: SortDirection | boolean | "") => { if (value === "desc" || value === "asc") { return value as SortDirection; @@ -49,7 +49,7 @@ export class SortableComponent implements OnInit { * return direction === 'asc' ? result : -result; * } */ - readonly fn = input(undefined); + readonly fn = input(); constructor(private table: TableComponent) {} diff --git a/libs/components/src/table/table-scroll.component.ts b/libs/components/src/table/table-scroll.component.ts index d8d44a049b5..e30339393e7 100644 --- a/libs/components/src/table/table-scroll.component.ts +++ b/libs/components/src/table/table-scroll.component.ts @@ -67,7 +67,7 @@ export class TableScrollComponent readonly rowSize = input.required(); /** Optional trackBy function. */ - readonly trackBy = input | undefined>(undefined); + readonly trackBy = input | undefined>(); @ContentChild(BitRowDef) protected rowDef: BitRowDef; diff --git a/libs/components/src/table/table.component.ts b/libs/components/src/table/table.component.ts index 89f1ae5b735..187c4c8d6f2 100644 --- a/libs/components/src/table/table.component.ts +++ b/libs/components/src/table/table.component.ts @@ -29,7 +29,7 @@ export class TableBodyDirective { imports: [CommonModule], }) export class TableComponent implements OnDestroy, AfterContentChecked { - readonly dataSource = input>(undefined); + readonly dataSource = input>(); readonly layout = input<"auto" | "fixed">("auto"); @ContentChild(TableBodyDirective) templateVariable: TableBodyDirective;