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

Method addData

src/cdk/table/table.spec.ts:2200–2214  ·  view source on GitHub ↗
(amount = 1)

Source from the content-addressed store, hash-verified

2198 }
2199
2200 addData(amount = 1) {
2201 let copiedData = this.data.slice();
2202
2203 for (let i = 0; i < amount; i++) {
2204 const nextIndex = copiedData.length + 1;
2205
2206 copiedData.push({
2207 a: `a_${nextIndex}`,
2208 b: `b_${nextIndex}`,
2209 c: `c_${nextIndex}`,
2210 });
2211 }
2212
2213 this.data = copiedData;
2214 }
2215}
2216
2217class BooleanDataSource extends DataSource<boolean> {

Callers 5

constructorMethod · 0.95
table.spec.tsFile · 0.45
mutateDataFunction · 0.45
constructorMethod · 0.45
constructorMethod · 0.45

Calls 1

pushMethod · 0.65

Tested by

no test coverage detected