| 103 | changeDetection: ChangeDetectionStrategy.OnPush, |
| 104 | }) |
| 105 | export class AppComponent { |
| 106 | readonly data = signal<Person[]>(makeData(10)) |
| 107 | readonly expanded = signal<ExpandedState>({}) |
| 108 | |
| 109 | readonly table = createAngularTable(() => ({ |
| 110 | data: this.data(), |
| 111 | columns, |
| 112 | state: { |
| 113 | expanded: this.expanded(), |
| 114 | }, |
| 115 | onExpandedChange: (updater) => |
| 116 | typeof updater === 'function' |
| 117 | ? this.expanded.update(updater) |
| 118 | : this.expanded.set(updater), |
| 119 | getRowCanExpand: () => true, |
| 120 | getCoreRowModel: getCoreRowModel(), |
| 121 | getExpandedRowModel: getExpandedRowModel(), |
| 122 | })) |
| 123 | } |
nothing calls this directly
no test coverage detected