MCPcopy Index your code
hub / github.com/angular/components / _setSelectionByValue

Method _setSelectionByValue

src/material/chips/chip-listbox.ts:283–291  ·  view source on GitHub ↗

Selects all chips with value.

(value: any, isUserInput: boolean = true)

Source from the content-addressed store, hash-verified

281
282 /** Selects all chips with value. */
283 _setSelectionByValue(value: any, isUserInput: boolean = true) {
284 this._clearSelection();
285
286 if (Array.isArray(value)) {
287 value.forEach(currentValue => this._selectValue(currentValue, isUserInput));
288 } else {
289 this._selectValue(value, isUserInput);
290 }
291 }
292
293 /** When blurred, marks the field as touched when focus moved outside the chip listbox. */
294 _blur() {

Callers 2

valueMethod · 0.95
ngAfterContentInitMethod · 0.95

Calls 2

_clearSelectionMethod · 0.95
_selectValueMethod · 0.95

Tested by

no test coverage detected