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

Method _getConcreteValue

src/cdk/collections/selection-model.ts:262–274  ·  view source on GitHub ↗

Returns a value that is comparable to inputValue by applying compareWith function, returns the same inputValue otherwise.

(inputValue: T, selection?: Set<T>)

Source from the content-addressed store, hash-verified

260
261 /** Returns a value that is comparable to inputValue by applying compareWith function, returns the same inputValue otherwise. */
262 private _getConcreteValue(inputValue: T, selection?: Set<T>): T {
263 if (!this.compareWith) {
264 return inputValue;
265 } else {
266 selection = selection ?? this._selection;
267 for (let selectedValue of selection) {
268 if (this.compareWith!(inputValue, selectedValue)) {
269 return selectedValue;
270 }
271 }
272 return inputValue;
273 }
274 }
275}
276
277/**

Callers 4

isSelectedMethod · 0.95
_setSelectionMethod · 0.95
_markSelectedMethod · 0.95
_unmarkSelectedMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected