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

Function getCellTextsByColumn

src/material/table/testing/table-harness.ts:115–127  ·  view source on GitHub ↗

Extracts the text of cells only under a particular column.

(rowsData: MatRowHarnessColumnsText[], column: string)

Source from the content-addressed store, hash-verified

113
114/** Extracts the text of cells only under a particular column. */
115function getCellTextsByColumn(rowsData: MatRowHarnessColumnsText[], column: string): string[] {
116 const columnTexts: string[] = [];
117
118 rowsData.forEach(data => {
119 Object.keys(data).forEach(columnName => {
120 if (columnName === column) {
121 columnTexts.push(data[columnName]);
122 }
123 });
124 });
125
126 return columnTexts;
127}

Callers 1

Calls 1

pushMethod · 0.65

Tested by

no test coverage detected