| 30 | changeDetection: ChangeDetectionStrategy.OnPush, |
| 31 | }) |
| 32 | export class AppComponent { |
| 33 | private readonly rowSelection = signal<RowSelectionState>({}) |
| 34 | readonly globalFilter = signal<string>('') |
| 35 | readonly data = signal(makeData(10_000)) |
| 36 | |
| 37 | readonly ageHeaderCell = |
| 38 | viewChild.required<TemplateRef<unknown>>('ageHeaderCell') |
| 39 | |
| 40 | readonly columns: ColumnDef<Person>[] = [ |
| 41 | { |
| 42 | id: 'select', |
| 43 | header: () => TableHeadSelectionComponent<Person>, |
| 44 | cell: () => TableRowSelectionComponent<Person>, |
| 45 | }, |
| 46 | { |
| 47 | header: 'Name', |
| 48 | footer: props => props.column.id, |
| 49 | columns: [ |
| 50 | { |
| 51 | accessorKey: 'firstName', |
| 52 | cell: info => info.getValue(), |
| 53 | footer: props => props.column.id, |
| 54 | header: 'First name', |
| 55 | }, |
| 56 | { |
| 57 | accessorFn: row => row.lastName, |
| 58 | id: 'lastName', |
| 59 | cell: info => info.getValue(), |
| 60 | header: () => 'Last Name', |
| 61 | footer: props => props.column.id, |
| 62 | }, |
| 63 | ], |
| 64 | }, |
| 65 | { |
| 66 | header: 'Info', |
| 67 | footer: props => props.column.id, |
| 68 | columns: [ |
| 69 | { |
| 70 | accessorKey: 'age', |
| 71 | header: () => this.ageHeaderCell(), |
| 72 | footer: props => props.column.id, |
| 73 | }, |
| 74 | { |
| 75 | header: 'More Info', |
| 76 | columns: [ |
| 77 | { |
| 78 | accessorKey: 'visits', |
| 79 | header: () => 'Visits', |
| 80 | footer: props => props.column.id, |
| 81 | }, |
| 82 | { |
| 83 | accessorKey: 'status', |
| 84 | header: 'Status', |
| 85 | footer: props => props.column.id, |
| 86 | }, |
| 87 | { |
| 88 | accessorKey: 'progress', |
| 89 | header: 'Profile Progress', |
nothing calls this directly
no test coverage detected
searching dependent graphs…