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

Method addData

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

Source from the content-addressed store, hash-verified

2157 }
2158
2159 addData(amount = 1) {
2160 let copiedData = this.data.slice();
2161
2162 for (let i = 0; i < amount; i++) {
2163 const nextIndex = copiedData.length + 1;
2164
2165 copiedData.push({
2166 a: `a_${nextIndex}`,
2167 b: `b_${nextIndex}`,
2168 c: `c_${nextIndex}`,
2169 });
2170 }
2171
2172 this.data = copiedData;
2173 }
2174}
2175
2176class 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