MCPcopy
hub / github.com/angular/components / mutateData

Function mutateData

src/cdk/tree/tree-with-tree-control.spec.ts:513–526  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

511 }
512
513 function mutateData() {
514 // Swap first and second data in data array
515 const copiedData = component.dataSource.data.slice();
516 const temp = copiedData[0];
517 copiedData[0] = copiedData[1];
518 copiedData[1] = temp;
519
520 // Remove the third element
521 copiedData.splice(2, 1);
522
523 // Add new data
524 component.dataSource.data = copiedData;
525 component.dataSource.addData();
526 }
527
528 it('should add/remove/move nodes with reference-based trackBy', () => {
529 createTrackByTestComponent('reference');

Callers 1

Calls 1

addDataMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…