1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-12 06:23:38 +00:00

table module improvements

This commit is contained in:
Vicki League
2025-06-25 16:58:49 -04:00
parent 44bd72b4df
commit bb6324a9c3
3 changed files with 5 additions and 5 deletions

View File

@@ -26,9 +26,9 @@ export class SortableComponent implements OnInit {
/**
* Mark the column as sortable and specify the key to sort by
*/
readonly bitSortable = input<string>(undefined);
readonly bitSortable = input<string>();
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<SortFn>(undefined);
readonly fn = input<SortFn>();
constructor(private table: TableComponent) {}

View File

@@ -67,7 +67,7 @@ export class TableScrollComponent
readonly rowSize = input.required<number>();
/** Optional trackBy function. */
readonly trackBy = input<TrackByFunction<any> | undefined>(undefined);
readonly trackBy = input<TrackByFunction<any> | undefined>();
@ContentChild(BitRowDef) protected rowDef: BitRowDef;

View File

@@ -29,7 +29,7 @@ export class TableBodyDirective {
imports: [CommonModule],
})
export class TableComponent implements OnDestroy, AfterContentChecked {
readonly dataSource = input<TableDataSource<any>>(undefined);
readonly dataSource = input<TableDataSource<any>>();
readonly layout = input<"auto" | "fixed">("auto");
@ContentChild(TableBodyDirective) templateVariable: TableBodyDirective;