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

Function compareFun

src/cdk/collections/selection.spec.ts:340–340  ·  view source on GitHub ↗
(x: Item, y: Item)

Source from the content-addressed store, hash-verified

338 const v1: Item = {key: 1, value: 'blue'};
339 const v2: Item = {key: 1, value: 'green'};
340 const compareFun = (x: Item, y: Item) => x.key === y.key;
341 const model = new SelectionModel<Item>(false, [v1], false, compareFun);
342 model.deselect(v2);
343 expect(model.selected.length).toBe(0);

Callers 1

selection.spec.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected