MCPcopy Index your code
hub / github.com/angular/components / createGrid

Function createGrid

src/aria/private/grid/grid.spec.ts:141–162  ·  view source on GitHub ↗
(gridData: TestRowData[], gridInputs: TestGridInputs)

Source from the content-addressed store, hash-verified

139}
140
141function createGrid(gridData: TestRowData[], gridInputs: TestGridInputs) {
142 const rows = signal<GridRowPattern[]>([]);
143
144 gridInputs.getCell = (el: Element | null) => {
145 for (const row of rows()) {
146 for (const cell of row.inputs.cells()) {
147 if (cell.element() === el) return cell;
148 }
149 }
150 return undefined;
151 };
152
153 const grid = new GridPattern({
154 ...gridInputs,
155 rows,
156 });
157
158 const {gridRows} = createGridRows(grid, gridData);
159 rows.set(gridRows);
160
161 return {grid, rows};
162}
163
164describe('Grid', () => {
165 describe('GridCellWidgetPattern', () => {

Callers 1

grid.spec.tsFile · 0.85

Calls 4

signalFunction · 0.90
createGridRowsFunction · 0.85
setMethod · 0.80
elementMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…