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

Method addData

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

Source from the content-addressed store, hash-verified

2227 }
2228
2229 addData(amount = 1) {
2230 let copiedData = this.data.slice();
2231
2232 for (let i = 0; i < amount; i++) {
2233 const nextIndex = copiedData.length + 1;
2234
2235 copiedData.push({
2236 a: `a_${nextIndex}`,
2237 b: `b_${nextIndex}`,
2238 c: `c_${nextIndex}`,
2239 });
2240 }
2241
2242 this.data = copiedData;
2243 }
2244}
2245
2246class 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