MCPcopy Index your code
hub / github.com/TanStack/table / AppComponent

Class AppComponent

examples/angular/row-selection/src/app/app.component.ts:34–153  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 6

makeDataFunction · 0.90
flexRenderComponentFunction · 0.90
createAngularTableFunction · 0.90
getCoreRowModelFunction · 0.85
getFilteredRowModelFunction · 0.85
getPaginationRowModelFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…