mirror of
https://github.com/bitwarden/browser
synced 2026-02-12 06:23:38 +00:00
table module improvements
This commit is contained in:
@@ -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) {}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user