MCPcopy Create free account
hub / github.com/angular/components / GridTestComponent

Class GridTestComponent

src/aria/grid/grid.spec.ts:1197–1270  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1195});
1196
1197@Component({
1198 template: `
1199 <table ngGrid
1200 [disabled]="disabled()"
1201 [multi]="multi()"
1202 [rowWrap]="rowWrap()"
1203 [colWrap]="colWrap()"
1204 [focusMode]="focusMode()"
1205 [softDisabled]="softDisabled()"
1206 [enableSelection]="enableSelection()"
1207 [selectionMode]="selectionMode()"
1208 [tabindex]="tabIndex()">
1209 @for (row of gridData(); track row; let rIndex = $index) {
1210 <tr ngGridRow [rowIndex]="row.rowIndex">
1211 @for (cell of row.cells; track cell; let cIndex = $index) {
1212 <td ngGridCell
1213 [id]="cell.id"
1214 [disabled]="cell.disabled ?? false"
1215 [role]="cell.role ?? 'gridcell'"
1216 [rowIndex]="cell.rowIndex"
1217 [colIndex]="cell.colIndex"
1218 [rowSpan]="cell.rowSpan ?? 1"
1219 [colSpan]="cell.colSpan ?? 1"
1220 [selectable]="cell.selectable ?? true">
1221 Cell {{rIndex}}-{{cIndex}}
1222 @for (widget of cell.widgets || []; track $index; let wIndex = $index) {
1223 @if (widget.hasTarget) {
1224 <button ngGridCellWidget
1225 [id]="widget.id ?? ('w' + rIndex + '-' + cIndex + '-' + wIndex)"
1226 [widgetType]="widget.type ?? 'simple'"
1227 [disabled]="widget.disabled ?? false"
1228 [tabindex]="widget.tabindex"
1229 [focusTarget]="targetInput"
1230 (activated)="onActivated($event)"
1231 (deactivated)="onDeactivated($event)">
1232 Widget
1233 </button>
1234 <input #targetInput id="target-{{widget.id}}" type="text" />
1235 } @else {
1236 <button ngGridCellWidget
1237 [id]="widget.id ?? ('w' + rIndex + '-' + cIndex + '-' + wIndex)"
1238 [widgetType]="widget.type ?? 'simple'"
1239 [disabled]="widget.disabled ?? false"
1240 [tabindex]="widget.tabindex"
1241 (activated)="onActivated($event)"
1242 (deactivated)="onDeactivated($event)">
1243 Widget
1244 </button>
1245 }
1246 }
1247 </td>
1248 }
1249 </tr>
1250 }
1251 </table>
1252 `,
1253 imports: [Grid, GridRow, GridCell, GridCellWidget],
1254 changeDetection: ChangeDetectionStrategy.Eager,

Callers

nothing calls this directly

Calls 2

signalFunction · 0.85
createGridDataFunction · 0.70

Tested by

no test coverage detected